1,075
社区成员
发帖
与我相关
我的任务
分享
string name,ls_sql,code
dec ld_value
code= "1"
ls_sql= "select sum(a.value) from ttt a where code = ?"
DECLARE c1 DYNAMIC CURSOR FOR SQLSA;
PREPARE SQLSA FROM :ls_sql;
OPEN DYNAMIC c1 USING :code;
FETCH c1 INTO :ld_value;
If SQLCA.SQLCode=0 then //如果成功取出记录
messagebox('',string(ld_value))
end if
CLOSE c1;
string ls_sql
dec ld_value
ls_sql= "select sum(a.value) from ttt a"
DECLARE c1 DYNAMIC CURSOR FOR SQLSA;
PREPARE SQLSA FROM :ls_sql;
FETCH c1 INTO :ld_value;
If SQLCA.SQLCode=0 then //如果成功取出记录
messagebox('',string(ld_value))
end if
CLOSE c1;