[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: [sqr-users] Writing a single quote in a string



Hi Peggy
I am making tab delimited file, and single quotes should be included in
it.
Here is the code. 
It works for us. We are on PT 8.21 Oracle 9i
        
         let $quote = ''''
         let $Q_TAB_Q = '''' || chr(9) || ''''    !quote tab quote
         let $tab = chr(9)
       !end of delimiters definition

write 2 from
               $quote:1                            !1
         $AGENCY:4                         !2
               $Q_TAB_Q:3                    !6
         $POSITION_NUMBER:15    !9
               $Q_TAB_Q:3                    !24
         $APPSTRTDT:10                 !27
               $Q_TAB_Q:3                    !37
         $APPENDDT:10                  !40
               $Q_TAB_Q:3                    !50
         $JOBCODE:8                      !53
               $Q_TAB_Q:3                    !61

       and so on

 the results are:

 '3750'     'ADM00100200   '       '09/01/2002'    '12/31/9999'   
'000446  '
 '3750'     'A0510011028    '       '09/01/2005'    '09/15/2005'   
'000001  '
 '3750'     'F0900200086    '       '01/01/1900'    '12/31/9999'   
'000001  '
 '3750'     'F2210047337    '       '06/16/2005'    '09/15/2005'   
'000001  '
 and so on
Natalie



Natalie Kovalerchuk,
Tech Lead Analyst PS HRMS
Information Technology Specialist IV, 
Information Technology Services department, 
Central Washington University
(509) 963-2966
nataliek@cwu.edu 


>>> Peggy.Griffith@sappi.com 2/21/2006 7:10:51 AM >>>
Hi - my SQR is writing a text file and I need to include a single
quote
as part of a string; does anyone know how to do that?  

 

Example:

let xxx = ''3207368'10001 'HRAF'

(after the first single quote there is supposed to be a single quote,
and then within the string there are 2 other single quotes as well as
a
space).

 

I have been told to try using the single quote within single quotes
which does not work, also told to try 4 single quotes before the
string
but that does not work.

 

Peggy Griffith

Business Systems Analyst

Sappi Fine Paper North America

179 John Roberts Road

South Portland, Maine 04016

Tel: 207.854.7466

 

 


This message may contain information which is private, privileged or
confidential and is intended solely for the use of the individual or
entity named in the message. If you are not the intended recipient of
this message, please notify the sender thereof and destroy / delete the
message. Neither the sender nor Sappi Limited (including its
subsidiaries and associated companies) shall incur any liability
resulting directly or indirectly from accessing any of the attached
files which may contain a virus or the like.



_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users