Home » SQL & PL/SQL » SQL & PL/SQL » How to implement a select in an if-then statement?
How to implement a select in an if-then statement? [message #20034] Thu, 25 April 2002 12:49 Go to next message
STP
Messages: 1
Registered: April 2002
Junior Member
When I compile, it does not like the select statement, any ideas? Thanks!

if v_cstid = 87
and (select '1' into v_x
from ut_parameters
where param_type = 'MAINT87'
and description like '%'||upper(user)||'%';
return (TRUE);
exception
when no_data_found
then null;
end;)
then return(TRUE);
exception
when no_data_found then
null;
end if;
Re: How to implement a select in an if-then statement? [message #20036 is a reply to message #20034] Thu, 25 April 2002 13:31 Go to previous message
ora_guy
Messages: 4
Registered: April 2002
Junior Member
Do select first into a variable and then check it in IF condition for value.
Previous Topic: Case statement in pl/sql
Next Topic: & problem in sql query....
Goto Forum:
  


Current Time: Thu Apr 18 17:02:38 CDT 2024