Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.misc -> Re: How To Do This In Oracle
In article <a80fuq$2ke$1_at_slb1.atl.mindspring.net>, "Adam says...
>
>With Microsoft Access, to assign a conditional value to a calculated field I
>use the IIf() function as below:
>
>SELECT Iff([Paid], NULL, [InvoiceAmt])
>
decode( paid,
1, NULL, InvoiceAmt );
that says:
if (paid = 1) then NULL
else InvoiceAmt;
>This is interpreted as: if the Paid field value is true, then make the
>calculated field value null (blank); otherwise, make the calculated field
>value the same as the InvoiceAmt field value.
>
>How to do this in oracle? Thanks in advance.
>
>
-- Thomas Kyte (tkyte@us.oracle.com) http://asktom.oracle.com/ Expert one on one Oracle, programming techniques and solutions for Oracle. http://www.amazon.com/exec/obidos/ASIN/1861004826/ Opinions are mine and do not necessarily reflect those of Oracle CorpReceived on Thu Mar 28 2002 - 19:45:03 CST