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 -> SQL*Plus question

SQL*Plus question

From: Andy Kent <andykent.bristol1095_at_virgin.net>
Date: 31 Jan 2005 07:44:13 -0800
Message-ID: <1107186252.988112.34620@c13g2000cwb.googlegroups.com>


I've got a really simple requirement.
Basically all I want to do is:

select * from table1 where key=value;
if found
display it;
else
select * from table2 where key=value;
display it;
end if;

I want to do it in the simplest possible .sql script so I can just invoke it from SQL*Plus. Should be standing-on-your-head stuff but I'm struggling to get my head around the interaction between SQL*Plus, SQL and PL/SQL in this.
What should the script look like?

Many thanks

Andy Kent Received on Mon Jan 31 2005 - 09:44:13 CST

Original text of this message

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