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: Mercadante, Thomas F <NDATFM_at_labor.state.ny.us>
Date: Tue, 10 Jun 2003 10:58:44 -0700
Message-ID: <F001.005AE6C9.20030610102459@fatcity.com>

<SPAN

class=805371717-10062003>Laura,
<SPAN

class=805371717-10062003> 
try it
this way:
<SPAN

class=805371717-10062003> 
<FONT

face="Times New Roman" color=#000000 size=3>   :b :='and sub_account_no=' || '''' || '864240103' || '''';
<FONT face=Arial color=#0000ff

size=2>remember - 4 quotes gets you one. Tom Mercadante <FONT face=Arial
size=2>Oracle Certified Professional

  <FONT face=Tahoma
  size=2>-----Original Message-----From: laura pena   [mailto:[EMAIL PROTECTED]Sent: Tuesday, June 10, 2003 1:25   PMTo: Multiple recipients of list ORACLE-LSubject: 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 refcursorvar 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::= . ( @ % ;   immediateThe symbol ";" was substituted for "" to continue.    
  Thanks in advance.
   
  -Lizz      

  Do you Yahoo!?Free <A
  href="http://us.rd.yahoo.com/mail_us/tag/*http://calendar.yahoo.com">online   calendar with sync to Outlook(TM). Received on Tue Jun 10 2003 - 12:58:44 CDT

Original text of this message

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