标题:[求助]select a into :i_pd from dual where exists (select * from yd_yp ...
取消只看楼主
nzylbx
Rank: 1
等 级:新手上路
帖 子:1
专家分:0
注 册:2006-8-30
 问题点数:0 回复次数:0 
[求助]select a into :i_pd from dual where exists (select * from yd_yprkb whe

我的PB程序如下:
string v_ypbm
int i_pd
v_ypbm='1111111111'

我建立了一个表dual ,a为数值型 1
select a into :i_pd from dual
where exists (select * from yd_yprkb where ypbm=:v_ypbm);

用以上方法i_pd的值总是为0

但改用下面语句可以得到i_pd的返回值为1

select a into :i_pd from dual
where exists (select * from yd_yprkb where ypbm='1111111111');

注:表yd_yprkb中 ypbm 字段为字符型

为什么把变量v_ypbm换成'1111111111',就有返回值了呢,请高手指教!!!

搜索更多相关主题的帖子: dual select exists whe yprkb 
2006-08-30 23:02



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-87071-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.550124 second(s), 8 queries.
Copyright©2004-2025, BCCN.NET, All Rights Reserved