i'm currently working with a stored procedure ( on oracle toad )which has a lot of unions and left joins. I want to declare a variable and get a unique value from a table. this is what i want to do:
CREATE OR REPLACE PROCEDURE owner.SP_nameofsp
(
parameters
)
is
begin
declare variable nvarchar2;
select value into variable from table; <- this is not working
OPEN pcursorFOR
select
(.....)
end;
/
is this possible? if so how can i do it? thanks!