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

Home -> Community -> Usenet -> c.d.o.misc -> Dumb Oracle SQL question

Dumb Oracle SQL question

From: <bbcrock_at_gmail.com>
Date: 3 Sep 2006 13:54:13 -0700
Message-ID: <1157316853.276732.247780@p79g2000cwp.googlegroups.com>


This is annoying me. Been working on some other things and this complex query came back to bite me. Oracle 9i.

I have a parent record and one or more child records.

I want the query to join on the "Approved" record, (Status = 'A') where it exists and if it doesn' exist then join on the draft record (Status = 'D'). There is always one draft record, but there might be an approved record.

I tried some attempts with subselects and NVLs, but they failed. I didn't save this code.

Can anyone point me to Ask Tom or another example? I looked there first, but I'm using the wrong keywords.

thanks,

Don Received on Sun Sep 03 2006 - 15:54:13 CDT

Original text of this message

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