SELECT transdate,amount/100,termno,referno INTO c_transdate,misAmount,misTermno,misReferno
FROM mis_trans WHERE termno=c_posno AND referno = c_referno;
if c_transdate is null then
在上面这段里面,因为是肯定没有相关记录的,我认为c_transdate为NULL,但是这个IF语句似乎没有进来,是我判断写错了,难道不是NULL,请各位指教,在线等,谢谢大家
FROM mis_trans WHERE termno=c_posno AND referno = c_referno;
if c_transdate is null then
在上面这段里面,因为是肯定没有相关记录的,我认为c_transdate为NULL,但是这个IF语句似乎没有进来,是我判断写错了,难道不是NULL,请各位指教,在线等,谢谢大家
FROM mis_trans WHERE termno=c_posno AND referno = c_referno;
先直接看一下这个的结果是什么?你可以用
select isnull(transdate),transdate
FROM mis_trans WHERE termno=c_posno AND referno = c_referno;
看看到底是不是null
SQL语句的结果是怎样的