[thelist] SQL Question - 'Contingent Columns'

Luther, Ron Ron.Luther at COMPAQ.com
Tue Apr 16 11:20:00 CDT 2002


Hi Rudy,


Oracle.

Yep - I can use something like "sydate()-1" to get the date for yesterday.

{I'm the 'business-side' guy, I don't think the DBAs are gonna let me write temp tables.}

I was hoping there might be some odd 'decode' syntax that might let me define the value in a selected column by referencing another ... something like "select (if "AP, then col2 ... if "NA", then col3) as yesterday".

[As a backup plan - I'm thinking I can create some new columns in JavaScript and get them populated correctly - but that would put the monkey on the client machine instead of thd db engine.]


RonL.
I just put it in Toronto time to get your attention.   ;-)

-----Original Message-----
From: rudy [mailto:r937 at interlog.com]

> Sorry it wasn't clear - I'll try again:

getting clearer...

> I need a way to put things back together.

what database engine?  do you have scripting?  temp tables?

will CURRENT_DATE - 1 DAY get the correct "yesterday" to match the date
table?

(i am not so much concerned with time zones, i figure whole dates is what
you want, right?)


rudy

p.s madhu the enforcer is in india, whereas i am in toronto

... or why else did you mention toronto time?

--
For unsubscribe and other options, including
the Tip Harvester and archive of thelist go to:
http://lists.evolt.org Workers of the Web, evolt !



More information about the thelist mailing list