SQL Select Question

xospec1alk

Diamond Member
Mar 4, 2002
4,329
0
0
I have a database that contains a value for the "Due Date"

is there a way to output whether a row is "Overdue" by checking if Due Date < SYSDATE and then creating a new column to hold this boolean data?

i know you can do select (1+1) as overdue....which will create a new column called overdue and populate it with 2...

but i can't seem to get it to work with a logical instead of a mathematical
 

znaps

Senior member
Jan 15, 2004
414
0
0
I think you can use a CASE statement for this. There are probably other ways also.
 

xospec1alk

Diamond Member
Mar 4, 2002
4,329
0
0
Originally posted by: znaps
I think you can use a CASE statement for this. There are probably other ways also.

w00t, that works great, as you can tell im still a sql n00b.

as for squirrel thx for the tip, i will try that out as well