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 handle embedded single quotes in procedure

RE: How to handle embedded single quotes in procedure

From: Mercadante, Thomas F <NDATFM_at_labor.state.ny.us>
Date: Mon, 01 Jul 2002 07:53:39 -0800
Message-ID: <F001.0048CD5B.20020701075339@fatcity.com>


Rick,

Actually, it should work fine unless you are using dynamix sql, in which case, you can use the REPLACE function to add an additional single quote.

Within the procedure you are calling, you may do the following:

    loc_quote varchar2(1) := '''';

    REPLACE(value_to_be_inserted,loc_quote,loc_quote || loc_quote)

I just had the exact same issued and the above solved the problem. You could use the REPLACE statment in an Insert or Update statement.

Hope this helps.

Tom Mercadante
Oracle Certified Professional

-----Original Message-----
Sent: Monday, July 01, 2002 11:35 AM
To: Multiple recipients of list ORACLE-L

Hi DBAs,

I have strings that are being passed into parameters that contain embedded single quotes. Obviously this fails the insert and update statements. How can I handle these inside stored procedure?

Thanks
Rick

--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author:
  INET: Rick_Cale_at_teamhealth.com

Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (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).
--

Please see the official ORACLE-L FAQ: http://www.orafaq.com
--

Author: Mercadante, Thomas F
  INET: NDATFM_at_labor.state.ny.us
Fat City Network Services    -- (858) 538-5051  FAX: (858) 538-5051
San Diego, California        -- Public Internet access / Mailing Lists
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message to: ListGuru_at_fatcity.com (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 Mon Jul 01 2002 - 10:53:39 CDT

Original text of this message

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