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!

Evaluating a value inside stored procedure.

Status
Not open for further replies.

milmand

Programmer
Nov 22, 2002
24
US
Please help!
Inside my stored procedure, I need to retrieve a value from a table, evaluate it and perform logic based on result.
Ex:

declare
X number;
begin
x = select max(length(id)) from user_id where ... ;
if
x=5
then
step1
else
step2
end if;


How to hande this situation correctly?
 
The SQL should be
select max(length(id)) into X
from user_id where ... ;

Rgs,
microsky
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top