eric.dizon
28th June 2015, 00:10
The point here is can I use double.cmp function in my SQL Statement in baan?
T-SQL Version - if I don't cast the value for a.t_mtst I am getting result that I don't need.
SELECT * FROM tcxlog070800 a
WHERE (a.t_pdno = 'B00000480' AND (CAST(a.t_mtst as Decimal(13,1)) < 1842.9 AND a.t_mten > 1791.2))
BAAN Version
select a.*
from cxlog070 a
where (a._index3 = {:l.clot} and (a.mtst < :l.enmt and a.mten > :l.stmt)
My Attempt to use double.cmp I am getting invalid argument error : Has anybody tried to compare decimal yet ?
select a.*
from cxlog070 a
a._index3 = {:l.clot} and ((double.cmp(a.mtst,l.enmt,0.0001) < 0
Your help will be greatly appreciated.
T-SQL Version - if I don't cast the value for a.t_mtst I am getting result that I don't need.
SELECT * FROM tcxlog070800 a
WHERE (a.t_pdno = 'B00000480' AND (CAST(a.t_mtst as Decimal(13,1)) < 1842.9 AND a.t_mten > 1791.2))
BAAN Version
select a.*
from cxlog070 a
where (a._index3 = {:l.clot} and (a.mtst < :l.enmt and a.mten > :l.stmt)
My Attempt to use double.cmp I am getting invalid argument error : Has anybody tried to compare decimal yet ?
select a.*
from cxlog070 a
a._index3 = {:l.clot} and ((double.cmp(a.mtst,l.enmt,0.0001) < 0
Your help will be greatly appreciated.