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

RE: [sqr-users] Fwd: Double double-quotes



Double quotes are not special characters in SQR.  Try:

let $x = 'Double quotes are ""fun"" to use'
show $x

-----Original Message-----
From: Pamela Thompson-Cook [mailto:thompson-cook.1@it.ohio-state.edu]
Sent: Monday, October 27, 2003 11:35 AM
To: sqr-users@sqrug.org
Subject: [sqr-users] Fwd: Double double-quotes



>Date: Mon, 27 Oct 2003 14:04:14 -0500
>From: Pamela Thompson-Cook <thompson-cook.1@it.ohio-state.edu>
>Subject: Double double-quotes
>X-Sender: thompson-cook.1@krc-email.oitlan.oit.ohio-state.edu
>To: sqr-users@sqrug.org
>X-Mailer: QUALCOMM Windows Eudora Version 5.1.1
>X-OriginalArrivalTime: 27 Oct 2003 19:04:16.0887 (UTC)
>  FILETIME=[1E601070:01C39CBD]
>
>
>
>         Hi All,
>
>         I use SQR 6.1.4 for ODBC and need to write code that will embed a 
> text field with two (2) sets
>         of double quotes which is contained in a string that is 
> surrounded with a set of double quotes -
>
>         ex.  original string = Robert "Bo" Scott
>                  edited string = "Robert ""Bo"" Scott" (what I need)
>
>         In order to embed the 2 sets of double quotes around the nickname 
> field
>           I have tried several different things:
>
>         first, I set the replacement string in a translate statement to ' 
> """ '  (3 sets of double quotes)
>               let $wkFullName = translate($wkFullName,'"','"""')
>           but it returns the nickname with just one set of double quotes 
> around it: "Bo"
>
>           second, I set the replacement string in a translate statement 
> to ' """" '  (4 sets of double quotes)
>               let $wkFullName = translate($wkFullName,'"','"""')
>           but it returns the nickname with just one set of double quotes 
> around it: "Bo"
>
>           thirdly, I tried setting the quotes I wanted in a variable...
>            let $ascii-dbl-quote = chr(34)
>            let $ascii-6-quote = 
> $ascii-dbl-quote||$ascii-dbl-quote||$ascii-dbl-quote
>
>           then I used that variable as the replacement string in a 
> translate statement...
>              let $wkFullName = translate($wkFullName,'"',$ascii_6_quote)
>           but it returns the nickname with just one set of double quotes 
> around it also: "Bo"
>
>
>          lastly, I changed the quotes I wanted in a variable...
>            let $ascii-dbl-quote = chr(34)
>              let $ascii-sgl-quote = chr(39)
>            let $ascii-6-quote = 
> $ascii-sgl-quote||$ascii-dbl-quote||$ascii-dbl-quote||$ascii-sgl-quote
>
>           then I used that variable as the replacement string in a 
> translate statement...
>              let $wkFullName = translate($wkFullName,'"',$ascii_6_quote)
>           but this time, it returns the nickname with one set of single 
> quotes around it: 'Bo'
>
>         I have run out of ideas...  can anyone come up with any other 
> suggestions?
>
>
>
>
>
>
>
>

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

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