读书人

关于PB顶用SQL语句in的用法

发布时间: 2013-03-29 14:24:52 作者: rapoo

关于PB中用SQL语句in的用法
in在PB程序(数据库是ORACLE)查询中怎么写嗯:比如
select count(*) into:ll_cnt from id in(‘a’,‘b’,‘c’,‘d’);PB调试是报错的,该怎么样写嗯
select count(*) into:ll_cnt from id in(:ls_id); 也报错该怎么样写嗯
[解决办法]
select count(*) into :ll_cnt from 表 where id in(‘a’,‘b’,‘c’,‘d’);
[解决办法]
看样子楼主的引号是全角的
[解决办法]

引用:
不好意思,写错了,有本来有表名就报错了的
select count(1) into:ll_cnt from dd where id in('A','B','D');
select count(1) into:ll_cnt from dd where id in(:ls_id);
这样也报错。。。


发贴最主要的是:
要把报错贴出来,因为谁也不晓得你的错到底是什么
可能是表不存在,也可能是字段类型不对,也可能是列名不存在....

读书人网 >PB

热点推荐