Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Struggling with multiple response scrip?

Status
Not open for further replies.

ASmee

IS-IT--Management
Jul 9, 2002
46
US
I want to write a script that will do the following:

1 - select colum from table where condition = "R"

Then I want wrap this statement around the condition that if the outcome of the above is 0 rows then:

select message from messages where id = 1

I am struggling with Oracle, I could right it in MS SQL.
 
Try something like

select message from messages where id = 1
and not exists ( select colum from table where condition = "R")

Note that in Oracle string literals are quoted by single quotes.

Regards, Dima
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top