RE: Oracle SQL alternative for YesNoFormat() ?

2005-08-31 Thread Dave.Phillips
: Monday, August 29, 2005 3:40 PM To: CF-Talk Subject: RE: Oracle SQL alternative for YesNoFormat() ? I haven't messed with Oracle much but if you don't find a better solution, you can hack something up that returns the length of the value minus 2 which will return 1 for yes and 0 for no This should do

RE: Oracle SQL alternative for YesNoFormat() ?

2005-08-31 Thread Gaulin, Mark
This should do it (depending on the db)... SELECT CASE WHEN field = 1 THEN 'YES' ELSE 'NO' END AS yesNoField -Original Message- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Sent: Wednesday, August 31, 2005 12:23 PM To: CF-Talk Subject: RE: Oracle SQL alternative for YesNoFormat

RE: Oracle SQL alternative for YesNoFormat() ?

2005-08-31 Thread Michael Tangorre
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Bobby, This doesn't work for me because the values in the database are in a numeric column and stored as 1 or 0. I need the query to return 'yes' or 'no'. The query results are used for a CFINDEX, so the only option I can think of at

Re: Oracle SQL alternative for YesNoFormat() ?

2005-08-31 Thread Ken Ferguson
select case when column_name = 0 then 'no' else 'yes' end as column_name_yes_no_format --Ferg [EMAIL PROTECTED] wrote: Bobby, This doesn't work for me because the values in the database are in a numeric column and stored as 1 or 0. I need the query to return 'yes' or 'no'. The query

RE: Oracle SQL alternative for YesNoFormat() ?

2005-08-31 Thread Matt Osbun
:[EMAIL PROTECTED] Sent: Wednesday, August 31, 2005 11:33 AM To: CF-Talk Subject: RE: Oracle SQL alternative for YesNoFormat() ? From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] Bobby, This doesn't work for me because the values in the database are in a numeric column and stored as 1 or 0

RE: Oracle SQL alternative for YesNoFormat() ?

2005-08-29 Thread Bobby Hartsfield
I haven’t messed with Oracle much but if you don't find a better solution, you can hack something up that returns the length of the value minus 2 which will return 1 for yes and 0 for no This should do it... select len(YesNoField)-2 as YesOrNo from MyTable if the values in that field are only

RE: Oracle SQL alternative for YesNoFormat() ?

2005-08-29 Thread Bobby Hartsfield
I haven’t messed with Oracle much but if you don't find a better solution, you can hack something up that returns the length of the value minus 2 which will return 1 for yes and 0 for no This should do it... select len(YesNoField)-2 as YesOrNo from MyTable if the values in that field are only