如果你是问查询出来结果如何写入DW,则
用.SetItem方法写入DW;如果是多条返回结果,使用游标进行循环;
例:
DECLARE cursor_user CURSOR FOR
SELECT groupid
FROM right_group_user
WHERE usercode like :ls_usercode
using sqlca;
i = 1
open cursor_user;
fetch cursor_user into :ll_user_groupid;
do while sqlca.sqlcode=0
dw_1.SetItem(i,"groupid",ll_user_groupid)
i++
fetch cursor_user into :ll_user_groupid;
loop
close cursor_user;