当前位置: 代码迷 >> PB >> 动态SQL语句怎么返回值
  详细解决方案

动态SQL语句怎么返回值

热度:36   发布时间:2016-04-29 09:41:21.0
动态SQL语句如何返回值?
如ls_sql="selectblob a from b where c=1"如何获取a的值。

我的尝试代码:
declare pic dynamic cursor for sqlsa;
prepare sqlsa from :ls_sql using sqlca;
open dynamic pic;
fetch pic into :lb_pic;
close pic;

在open时sqlerrtext="ORA-24333 零迭代计数"


------解决方案--------------------
动态SQL似乎没问题呀

------解决方案--------------------
不是动态sql的问题 ,是你的 blob 字段的问题吧

不信换个语句
------解决方案--------------------
//单一
long ll_a = 0
select a into :ll_a from b where c = 1

//多个
long ll_a = 0 , ll_b = 0
select a into :ll_a , b into ll_b from b where c = 1 

//很多.
使用动态创建数据窗口,看下面.
  相关解决方案