🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Thread View: bit.listserv.sqlinfo
2 messages
2 total messages Started by Missy Pont Tue, 02 Apr 2002 07:23
Access To Oracle
#321
Author: Missy Pont
Date: Tue, 02 Apr 2002 07:23
7 lines
1210 bytes
The statement below is okay with Access but not okay with Oracle.

SELECT (X < Y) AS X_Is_Smaller
FROM MyTable;

Can anyone here able to convert the statement in Oracle? I posted this in
one of the Oracle's groups but haven't gotten any luck. Thanks in advance.
Re: Access To Oracle
#322
Author: elisabeth weisskircher
Date: Tue, 09 Apr 2002 23:21
25 lines
1754 bytes

Missy Pont schrieb:

> The statement below is okay with Access but not okay with Oracle.
>
> SELECT (X < Y) AS X_Is_Smaller
> FROM MyTable;
>
> Can anyone here able to convert the statement in Oracle? I posted this in
> one of the Oracle's groups but haven't gotten any luck. Thanks in advance.

There is no boolean column datatype in oracle sql.
if you want to display the numbers 1 if x<y and 0 if not, then use

select decode(greatest(x,y),x,0,1) AS X_Is_Smaller
FROM MyTable;

if you want to display the string True if x<y and False if not then use

select decode(greatest(x,y),x,'False','True') AS X_Is_Smaller
FROM MyTable;

hope this helps
guenter
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads