datetime dt_date
select discharge_date_time into :dt_date from A where A.iD='1002';
上面的sql查询出来是空值,为什么dt_date=1900-1-1
有什么办法控制它 如果是空值就提示么?
------解决方案--------------------
楼主想提示什么呀?
datetime dt_date
日期类型的变量,没得值,就默认1900-01-01吧,总不能等于空字符串吧
想提示的话,提前先判断一下吧
select count(1) into :ll_count from A where A.iD='1002' and discharge_date_time is null;
------解决方案--------------------
if sqlca.sqlcode = 0 then
//成功
else
//找不到值,或其它原因,比如网线断了。
setnull(dt_date)
end if