Invalid when querying against incoming parameters in Oracle stored procedure
Environment: oracle11g
Requirements: Query the relevant data based on the parameters passed in as criteria
Problem: Invalid condition
Code:
Create or Replace procedure XXX (Associatedid in varchar,typeinfoid in varchar)
As
Sheetcontent Clob;
Begin
Select Wm_concat (T.datasource) to sheetcontent from Xly_associatedorder t
where T.associatedid = Associatedid and t.typeinfoid = typeinfoid;
End XXX;
Workaround:
Create or Replace procedure XXX (Associatedid in varchar,typeinfoid in varchar)
As
Sheetcontent Clob;
P1 varchar (50);
P2 varchar (50);
Begin
P1:=associatedid;
p2:=typeinfoid;
Select Wm_concat (T.datasource) to sheetcontent from Xly_associatedorder t
where T.associatedid =p1 and t.typeinfoid =p2;
End XXX;
Oracle stored procedures query based on incoming parameters