Re: Unable to use DECODE with boolean variables
From: Charles Jardine <cj10_at_cam.ac.uk>
Date: 1996/02/14
Message-ID: <312220C9.6681_at_cam.ac.uk>#1/1
Date: 1996/02/14
Message-ID: <312220C9.6681_at_cam.ac.uk>#1/1
Dwayne King wrote:
> SQL> select decode(boolean_var,0,FALSE,1,TRUE) from test;
SQL simply does not have a boolean type. TRUE and FALSE are not reserved word.
PL/SQL does have booleans, but it doesn't have DECODE (except within SQL).
Received on Wed Feb 14 1996 - 00:00:00 CET
> select decode(boolean_var,0,FALSE,1,TRUE) from test
> *
> ERROR at line 1:
> ORA-0904: invalid column name
>
> SQL> spool off
>
> Of course, this works properly if I enclose the words FALSE and TRUE in quotes
> but then they are treated as character data.