Re: Query & Column Display

From: Ed Prochak <edprochak_at_gmail.com>
Date: Thu, 22 Jan 2009 09:51:57 -0800 (PST)
Message-ID: <0e577950-843b-40ef-b610-a8b8aaf46e37_at_33g2000yqm.googlegroups.com>



On Jan 22, 12:12 pm, mrdjmag..._at_aol.com wrote:
> I did this once before a long time ago, but cannot remember how.
>
> Say I have 2 tables.  I query table #1, and if the value I am looking
> for is not there, then get the value from table 2.
>
> Both tables have the same primary key, so they must be joined.  I
> remember this was NOT a lot of code with subselects and all that
> jazz.  But I cannot recall how it was done.
>
> Was looking at analytical stuff for this, but no luck yet......
>
> Thanks!

NVL() ?? select nvl(table1.val, table2.val) valueLookingFor from table1, table2
where table1.key = table2.key.

HTH,
  Ed Received on Thu Jan 22 2009 - 11:51:57 CST

Original text of this message