String strFilter,strId;
strFilter = "("
declare mycursor cursor for select id from ...;
open mycursor;
fetch mycursor into :strId;
do while sqlca.sqlcode = 0
strFilter = strFilter + strId +","
fetch mycursor into :strId;
loop
close mycursor;
strFilter = " id in " + strFilter + ")";
dw_1.setfilter(strFilter);
dw_1.filter();
strFilter = "("
declare mycursor cursor for select id from ...;
open mycursor;
fetch mycursor into :strId;
do while sqlca.sqlcode = 0
strFilter = strFilter + strId +","
fetch mycursor into :strId;
loop
close mycursor;
strFilter = " id in " + strFilter + ")";
dw_1.setfilter(strFilter);
dw_1.filter();
smartdonkey兄太抬舉小弟了.
你的SQL Server及Oracle知識都比小弟高出一大截.
我從你那學了不少東西.今後還要向你請教才是.