检索参数?
参数类型有多种,
date,long,string 等,
如果该参数为空的话就是检萦全部,就相当于没有这个参数,
string类型的让它等于“%”就可以了。
date,long类型的怎么写?
[解决办法]
date ld
long ll
setnull(ld)
setnull(ll)
dw_1.retrieve(ld, ll)
参数 rq date
参数 ts number
select * from tb
where (rq = :rq or rq is null) and (ts = :ts or ts is null)
[解决办法]
我只是给你演示为空的情况
date ld
long ll
ld = ...
ll = ...
if ld = 1900-01-01 then
setnull(ld)
end if
if ll < 0 then //假设ll小于0时为空
setnull(ll)
end if
dw_1.retrieve(ld, ll)
参数 rq date
参数 ts number
select * from tb
where (rq = :rq or :rq is null) and (ts = :ts or :ts is null)