I'm curious why I often see an extra string concatenation operation for putting a 
single-quote in a string. Is it for readability? Why not

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

Note - there are no double quote characters in the string above, only single quote 
characters. Two single quotes inside a string become one single quote.
e.g. try this

SQL> set serveroutput on
SQL> begin
  2     dbms_output.put_line ('WINNER TONY AWARD FOR BEST REVIVAL OF A PLAY') ;
  3     dbms_output.put_line ('Eugene O''Neill''s "Long Day''s Journey Into Night"') ;
  4  end ;
  5  /
WINNER TONY AWARD FOR BEST REVIVAL OF A PLAY
Eugene O'Neill's "Long Day's Journey Into Night"

-----Original Message-----

try it this way:

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

remember - 4 quotes gets you one.
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Jacques Kilchoer
  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).

Reply via email to