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

Home -> Community -> Usenet -> c.d.o.misc -> Re: simple PL/SQL syntax question.

Re: simple PL/SQL syntax question.

From: Jomarlen <jomarlen_at_aol.com>
Date: 1997/12/26
Message-ID: <19971226213401.QAA02317@ladder02.news.aol.com>#1/1

Hi

If you visit my web site at
http://members.aol.com
On my Oracle Utilities page and in my PL/SQL library you'll fimd a function IN_QUOTES that takes the drudge out of this.

Example (building a where clause in Forms)

 'and company_name = '||IN_QUOTES(:my_block.my_item)

John

>Makes perfect sense to me.......
>To embed a single quote in a string you usually need to double it.
>If you remove the text from your string its a bit clearer
>
>' '''|| || ''''
>
>so youve got 4 ticks and 4 ticks , both parts are a sinlge tick to start a
>string a single tick to end the string and in the middle two ticks to
>indicate an embeded single tick.
>
>Rob
>
>
>Rich Davies wrote in message
><01bd0f02$0030eec0$af01010a_at_msppc060.retek.com>...
>>Can someone explain why this works, please?
>>
>>I want to set the value of one local string variable in PL/SQl to:
>>
>> USER_ID = 'another_local_string'
>>
>>including the single ticks. Through trial and error I've found the
>>following assignment statement works.
>>
>>a_local_string := 'USER_ID = ''' || another_local_string || '''' ;
>>
>>In case this is hard to read with your typeface, that is: one single tick
>>at the beginning, three single ticks in the middle, and four single ticks
>>at the end.
>>
>>Does this make sense to anyone? If so please enlighten me. Thanks in
>>advance.
>>--
>>richard_davies_at_retek
Received on Fri Dec 26 1997 - 00:00:00 CST

Original text of this message

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