[thelist] Oracle Date Swizzle?

Plunkett, Matt MPlunkett at MSA.com
Tue Aug 26 15:29:12 CDT 2003

-----Original Message-----
From: Luther, Ron
Sent: Tuesday, August 26, 2003 3:35 PM
To: thelist at lists.evolt.org
Subject: RE: [thelist] Oracle Date Swizzle?

> While walking up the steps to another meeting I suddenly remembered 
that I may be running against a 'view' instead of a physical table.  
I'm wondering now if that extra level of interaction is what is causing 
the problems.  I'll drill into that and see if that's where my holdup 

This should not matter.  

> Oh, I need to 'bucketize' some open sales orders ... so I'm looking 
to add some "select {if due more than 15 but less than 30 days from 
*today* give me the net open order qty - else zero} etc" fields to 
my report.  (It's a format the users are comfortable with.)

I have a feeling I will be no help!  Frustrating because this feels like it
should be surmountable. :P  Anyway here's the query I would try, if your
BRIO thing doesn't do SQL, I have no idea what to do...

   FROM yourtable
  WHERE due_date between (TO_DATE('20021001', 'YYYYMMDD') + 15) and 
                         (TO_DATE('20021001', 'YYYYMMDD') + 30);

Also.  If this is a view...why not add a column to the view that just uses
Oracle to convert the date for you?  Then you could select from that new
column instead of performing the date calculation explicitly in your query.

More information about the thelist mailing list