Home » SQL & PL/SQL » SQL & PL/SQL » WITH STATEMENT in PL-SQL procedure block
WITH STATEMENT in PL-SQL procedure block [message #9814] |
Fri, 05 December 2003 10:30  |
Alvin
Messages: 7 Registered: December 2000
|
Junior Member |
|
|
Dear all,
Would anyone know if it's possible to include a WITH block inside an anonymous PL/SQL block? Following is the code I would like to perform :
DECLARE
WITH test AS (
SELECT * from subscribers
where id_subs = 1749
);
BEGIN
SELECT * from test;
END;
/
It doesn't work, and I'm not sure if its my syntax, or just the PL/SQL doesn't offer this option.
I am trying to avoid using a cursor because I'm running subsequent SQL select statments to get summarized data from the sql block.
Thanks in advance!
Regards,
Alvin
|
|
|
|
|
|
|
|
|
|
Goto Forum:
Current Time: Tue Jun 03 19:03:03 CDT 2025
|