Re: Can you use "If..Then" logic in SQL?

From: Paul Dorsey <>
Date: Mon, 10 May 1999 01:42:25 GMT
Message-ID: <5QqZ2.2909$>

You can either use decode (as suggested) or you can build a PL/SQL or JAVA function which is stored in the DB then you can acess the function like any other column.

Paul Dorsey
Dulcian, Inc.
212 595 7223
simone wrote in message <7gmrnj$r0g$>...

>In the SQL statement doesn't exist IF..then, but you can use
>iif(condition;right result; wrong result)
>Mitch ha scritto nel messaggio <7ganjk$de6$>...
>>-- I am programming a VB app that pulls data from an Oracle 8 database
>>Access for further manipulation. I am trying to figure out if there is a
>>way using either Oracle or Jet SQL to use "If..Then" logic in my SQL
>>For example,
>>"Select Table1.*, Table2.* where Table1.Key = Table2.Key (this is where
>>not sure about the syntax) and If Table2.Price and Table2.Date are NULL
>>Table1.Price, Table1.Date Else Table2.Price and Table2.Date"
>>I am sure I could just pull all records from the Oracle database into
>>and then use DAO methods to create another recordset that meets the above
>>criteria, but that's bound to be very slow. I'd like to use strictly SQL
>>possible. Any and all suggestions (Oracle, Access or VB) are appreciated.
>>Mitch Abaza
>>clear "delete" to mail
Received on Mon May 10 1999 - 03:42:25 CEST

Original text of this message