Solved: RE: [thelist] Oracle Date Swizzle?

Luther, Ron ron.luther at hp.com
Wed Aug 27 10:32:30 CDT 2003


Hi Gang,

Once I got that db field cast as a date it wasn't too tough to get the 
categorizations I wanted.  Here's what ended up working:

SELECT
	stuff
	, more stuff
	, TRUNC(TO_DATE(SYSDATE) - 
		TO_DATE( Open.Cus_Dt,  'YYYYMMDD'), 0)  as 'Delta Days'
	, ...
	, here's the "16-30 day" category
	, DECODE(SIGN(Request.Delta_Days - 15) + 
		SIGN(Request.Delta_Days - 31), 0, 
		Open.OrdUnit_Qt - Open.Ship_Qt, 0)
	, ...
FROM	some tables
WHERE	user conditions are met


Works just fine now. 

Thanks!  ;-)

RonL.



More information about the thelist mailing list