一个PB的sql 语句问题,能者多助,谢过了(100')

hjh032722 2008-04-24 04:04:53
我的pb程序代码是:
declare l_dbhistory Cursor for
select xh
from dbhistory where regno =:as_regno
using sqlca;
open l_dbhistory;

xhCursor:
Fetch l_dbhistory into :sheng_xh;
if sqlca.sqlcode = 0 then
xhstring+=string(sheng_xh)+","
goto xhCursor
end if
close l_dbhistory;//读取省数据库中的督办序号为了拼接shstring字符串
xhstring = " ("+xhstring+"0) "

declare c_dbhistory Cursor for

select regno,xh,recdept,dbdate,dbnr,dbdw,yfkdate
from dbhistory
where regno =:as_regno and xh not in :xhstring//问题!!!
using rmttrans;
open c_dbhistory;
startCursor:
Fetch c_dbhistory
into :ls_regno,:ld_xh,:ls_recdept,
:ldt_dbdate,:ls_dbnr,:ls_dbdw,:ldt_yfkdate;
.........
由上面拼接的字符串xhstring在下面的sql查询语句中无法识别,请问有无良策!!!
谢谢了!
...全文
78 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
knowledge_Is_Life 2008-05-01
  • 打赏
  • 举报
回复
以后需再关注,现在先帮你顶一下
zrc101 2008-04-30
  • 打赏
  • 举报
回复
都没人来,我来顶一下,
ahalf 2008-04-26
  • 打赏
  • 举报
回复
一般in需要()

3,422

社区成员

发帖
与我相关
我的任务
社区描述
其他开发语言 其他开发语言
社区管理员
  • 其他开发语言社区
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧