var a refcursor
var b varchar2(100);
begin
   :b :='and sub_account_no=' || CHR(39) || '864240103’ || CHR(39);
   execute :a := pkg_reports_Dynamiccti.fu_sales_analysis('2003-05-21
00:00:00','2003-06-02 00:00:00','20','864240103','order by calldate desc',:b);
end;
/

 

39 is ASCII code for ‘.

 

Igor Neyman, OCP DBA

[EMAIL PROTECTED]

 

 

-----Original Message-----
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of laura pena
Sent:
Tuesday, June 10, 2003 12:25 PM
To: Multiple recipients of list ORACLE-L
Subject: How to pass string with a ' to PL/SQL

 

I have procedure that needs to pass a string with a ' .

Anyone have any idea how to do this in PL/SQL

 

Here is my example:

 

var a refcursor
var b varchar2(100);
begin
   :b :='and sub_account_no=''864240103''';
   execute :a := pkg_reports_Dynamiccti.fu_sales_analysis('2003-05-21
00:00:00','2003-06-02 00:00:00','20','864240103','order by calldate desc',:b);
end;
/

This is giving me an error.

ERROR at line 3:
ORA-06550: line 3, column 12:
PLS-00103: Encountered the symbol "" when expecting one of the following:
:= . ( @ % ; immediate
The symbol ";" was substituted for "" to continue.

 

Thanks in advance.

 

-Lizz


Do you Yahoo!?
Free online calendar with sync to Outlook(TM).

Reply via email to