Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Mailing Lists -> Oracle-L -> RE: How to pass string with a ' to PL/SQL

RE: How to pass string with a ' to PL/SQL

From: Chelur, Jayadas {PBSG} <jayadas.chelur_at_pepsi.com>
Date: Tue, 10 Jun 2003 11:02:40 -0700
Message-ID: <F001.005AE710.20030610103439@fatcity.com>


change this  

:b :='and sub_account_no=''864240103''';
 

into this :-  

:b := ' and sub_account_no = '||''''||'864240103'||'''';
 

-----Original Message-----
Sent: Tuesday, June 10, 2003 1:25 PM
To: Multiple recipients of list ORACLE-L

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 <http://us.rd.yahoo.com/mail_us/tag/*http://calendar.yahoo.com> calendar with sync to Outlook(TM).

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Chelur, Jayadas {PBSG}
  INET: [EMAIL PROTECTED]

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
Received on Tue Jun 10 2003 - 13:02:40 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US