Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: IF Statement help in SQL

Re: IF Statement help in SQL

From: Thomas Kellerer <spam_eater_at_gmx.net>
Date: Thu, 04 Dec 2003 14:48:48 +0100
Message-ID: <bqne00$22maco$1@ID-13919.news.uni-berlin.de>

Lucy Chew schrieb:

> Hi,
>
> Can anyone please inform on how i can use an IF statement in the
> following code to bring in Addr_Country field but only when the
> address4 is blank (and input into were address4 should b, had it not
> been blank)- if not blank i dont want it to be brought in, i want it
> to be left as address4.
>

       SELECT     apps.payroll_area
                 ,apps.employee_number
                 ,apps.address1
                 ,apps.address2
                 ,apps.address3
                 ,nvl(apps.address4,apps.addr_country)
                 ,apps.postcode
       FROM      apps.xxhrs_person_v     apps
Received on Thu Dec 04 2003 - 07:48:48 CST

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US