|
-
passing parameter in FOR .. IN Loop
Hi,
The situation is as follows.
CREATE OR REPLACE PACKAGE BODY
AS
PROCEDURE ChartGenericHistory
( p_SQL IN Varchar2
, ChartOutput OUT ReturnCursor)
)
IS
.....
.....
BEGIN
FOR x IN (SELECT DISTINCT coname
FROM
table1
,table2
... etc
WHERE
table1.field1=table2.field3
.... etc.
----> here I need to add p_SQL-parameter
----> which is just a variable part of
the 'where' clause
)
Failed to concantenate, get PLS-00103
error saying something about the symbols which are expected in place.
How could I go about it?
Someting in the lines with?:
(
...
WHERE
table1.field1=table2.field3
AND ...
and '||p_SQL||'
)
Thanks a lot for your help.
Shurik12.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|