Article View: bit.listserv.sqlinfo
Article #322Re: Access To Oracle
From: elisabeth weisskircher
Date: Tue, 09 Apr 2002 23:21
Date: Tue, 09 Apr 2002 23:21
25 lines
1754 bytes
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
Technical Details
Message-ID:
<3CB37775.31218B20@gmx.at>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!skynet.be!skynet.be!news.algonet.se!algonet!newsfeed1.bredband.com!bredband!news01.chello.se!newsrouter.chello.at!news.chello.at.POSTED!53ab2750!not-for-mailReferences:
<a8bldr$cnr$1@slb5.atl.mindspring.net>Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 11355a,af48d263424a837f X-Google-Attributes: gid11355a,public X-Google-ArrivalTime: 2002-04-09 16:21:41 PST Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!newsfeed.stanford.edu!skynet.be!skynet.be!news.algonet.se!algonet!newsfeed1.bredband.com!bredband!news01.chello.se!newsrouter.chello.at!news.chello.at.POSTED!53ab2750!not-for-mail Message-ID: <3CB37775.31218B20@gmx.at> From: elisabeth weisskircher <wohnen.wien@gmx.at> X-Mailer: Mozilla 4.6 [de]C-CCK-MCD (Win98; I) X-Accept-Language: de,en MIME-Version: 1.0 Newsgroups: bit.listserv.sqlinfo Subject: Re: Access To Oracle References: <a8bldr$cnr$1@slb5.atl.mindspring.net> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Lines: 26 Date: Tue, 09 Apr 2002 23:21:31 GMT NNTP-Posting-Host: 212.186.99.231 X-Complaints-To: abuse@news.chello.at X-Trace: news.chello.at 1018394491 212.186.99.231 (Wed, 10 Apr 2002 01:21:31 CEST) NNTP-Posting-Date: Wed, 10 Apr 2002 01:21:31 CEST Organization: Customers chello Austria