Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Re: how to store as a varchar2 a string containing single quotes
dmscott_at_flash.net (DMScott) wrote in message news:<3b9eb2ea.14954769_at_news.prodigy.net>...
> I am very interested to store in a database the following kind of
> string data, which correctly resembles part of an SQL command:
>
> decode( handled_status, 'F', 0, 'U', 1, 'S', 2, 3 )
>
> 1. I am trying to avoid storing the chr( ) function as part of the
> string data
> 2. I am reluctant to do any auxiliary conversions on the string that
> would require conversion back to this before use
>
> The string would be stored in a regular Oracle table as varchar2.
>
> Help! I'm really out of ideas, and if I can't do this without going
> against #1 or #2 (or both), then say so! But I need something here!
Apart from trying to escape the ' by using '' for one ', there is no other solution than to go with #1
Hth,
Sybrand Bakker, Senior Oracle DBA Received on Wed Sep 12 2001 - 03:48:05 CDT