Select Into - Nulls [message #20126] |
Tue, 30 April 2002 07:55 |
Rob
Messages: 70 Registered: January 2000
|
Member |
|
|
Hello all,
I have a select...into statement in a stored procedure. The statement can bring back no results, thus resulting in a No_data error. What's the best approach around this? (nvl will not work in this instance)
Thanks
|
|
|
|
|
Re: Select Into - Nulls [message #20135 is a reply to message #20133] |
Tue, 30 April 2002 10:51 |
Todd Barry
Messages: 4819 Registered: August 2001
|
Senior Member |
|
|
Rob, if you want to continue on and just end up with a NULL value in your variable, then:
begin
begin
select col into x...;
exception
when no_data_found then
null; -- silently handle the exception
end;
-- continue on, value of x is null if not found
end;
|
|
|