Home » SQL & PL/SQL » SQL & PL/SQL » SQL*Plus and IF Logic
SQL*Plus and IF Logic [message #7658] Fri, 27 June 2003 09:02 Go to next message
DB
Messages: 7
Registered: February 2003
Junior Member
I'm trying to work this out ...

In SQL*Plus create a cursor variable cv

Then in PL/SQL execute a query along the lines of:

open :cv for
select ... blah blah blah

Return to SQL*Plus and:

format column ...
format column ...

print cv

==========

The above works fine. When I find data it prints out exactly right. My question is: if I don't find data is there any technique to avoid running the print cv statement, or avoid printing the blank results, in SQL*Plus?

Thanks so much!
Re: SQL*Plus and IF Logic [message #7668 is a reply to message #7658] Sun, 29 June 2003 02:00 Go to previous message
palash
Messages: 1
Registered: June 2003
Junior Member
u can use an exception of when no_data_found and just print a message or exit.

hope this solves ur problem if i understood it right.
Previous Topic: Simple question - displaying value of a variable
Next Topic: Interview on oracle 9i Application server
Goto Forum:
  


Current Time: Fri Apr 26 03:43:11 CDT 2024