Re: SQL Question - Creating a View

From: michael ringbo <mri_at_dde-nospam.dk>
Date: Tue, 16 Jun 1998 14:33:25 +0200
Message-ID: <35866615.C11AC571_at_dde-nospam.dk>


Hi

Don't know why you can't use decode. I see two possibilities (off the more simple kind):
1) select decode(address1,null,decode(address2,null,address3),address1) from .....
2) select nvl(address1,nvl(address2,address3),'no address info') from ....

Regards,

Michael Ringbo, DDE A/S

NeedaHoliday wrote:

> I am creating a view that requires the capability to do the following:
>
> - I have a table with three address lines. They can contain
> information or be null. The requirement is, scan each address line
> (1,2,3). If address line 1 contains data, populate the view. If
> address line 1 is null, check 2 and so on. Out of all address lines
> (1,2,3) populate the view with the first address contain information.
> I tried the DECODE to no avail. Is there another function I can use?
>
> Help
>
> Jim Stewart
> james.stewart!!pwgsc.gc.ca
>
> Substitute !! with _at_ for my email address (SPAM Guard)

--
to reply, remove the  "-nospam" from the address
Received on Tue Jun 16 1998 - 14:33:25 CEST

Original text of this message