[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
RE: [sqr-users] Replacing single quote with two single quotes
- Subject: RE: [sqr-users] Replacing single quote with two single quotes
- From: "Steve Cavill" <steve.cavill@infoclarity.com.au>
- Date: Wed, 11 Feb 2004 19:30:29 +1100
- Importance: Normal
- In-reply-to: <s028b74e.012@mail.frederick.edu>
- List-id: This list is for discussion about the SQR database reporting language from Hyperion. <sqr-users.sqrug.org>
Looks like there's a bug in v6:
The problem is the surrounding quotes, combined with replace.
This works in 6.2.1:
let $namefirstQ = replace($namefirst,$Quote,$twoquotes)
let $namefirstQ= ''''|| $namefirstQ || ''''
but this crashes:
let $namefirstQ = '''' || replace($namefirst,$Quote,$twoquotes) || ''''
Both work fine in sqr 8.1
Cheers, Steve.
-----Original Message-----
From: sqr-users-admin@sqrug.org [mailto:sqr-users-admin@sqrug.org]On
Behalf Of Jamie Harris
Sent: Wednesday, 11 February 2004 2:50 AM
To: sqr-users@sqrug.org
Subject: RE: [sqr-users] Replacing single quote with two single quotes
You're right. :)
I was at home reading my email before coming in - and forgot about the
relatively new "replace" function.
We've been on SQR 4.3.2 until last summer, so I'm still in the stone
age. :)
-----------------------------------------------------
James Harris
Junior Systems Programmer/Analyst
Information Technology Division
Frederick Community College
-----------------------------------------------------
>>> Peter_Burton@Hyperion.com 2/10/2004 9:15:55 AM >>>
Jamie,
You are incorrect. The LET TRANSLATE() function replaces characters
from
set_a with the matching relative character from set_b in the specified
string. The LET REPLACE() function replaces the specified sub-string
as
indicated.
BEGIN-REPORT
MOVE 'Howdy folk''s' TO $A
LET $B = Replace($A, '''', '''''')
SHOW $A ' ==> ' $B
END-REPORT
Yields:
Howdy folk's ==> Howdy folk''s
Peter
> -----Original Message-----
> From: sqr-users-admin@sqrug.org@HYPERION On Behalf Of
"Jamie
> Harris" <jharris@frederick.edu>
> Sent: Tuesday, February 10, 2004 8:54 AM
> To: sqr-users@sqrug.org
> Subject: Re: [sqr-users] Replacing single quote with two single
> quotes
>
> The problem is that Replace will never replace one character for two
> characters.
>
> If you give Replace a string, and 'abc' as the search string and
'xyz'
> as the replace string, it will change 'a' to 'x', 'b' to 'y' and 'c'
to
> 'z' in your string.
>
> You'll need another function. I can post one later if nobody else
does
> (I don't have my code available right now).
>
> -----------------------------------------------------
> James Harris
> Junior Systems Programmer/Analyst
> Information Technology Division
> Frederick Community College
> -----------------------------------------------------
> >>> rnpatter@colby.edu 02/09/04 18:28 PM >>>
> I'd like to replace a single quote with two single quotes. This
logic
> replaces a quote with the letter Z. Instead of Z, I want two single
> quotes.
>
> encode '<39>' into $Quote
> let $namefirstQ = replace($namefirst,$Quote,'Z')
>
> Thanks in Advance.
>
>
>
> -------------------------------------------------------------------
> Neal Patterson, Sr. Programmer/Analyst
> College Relations Information Systems Services, Colby College
> 4333 Mayflower Hill Drive, Waterville, ME 04901-8843
> Phone: (207)872-3419 E-mail: rnpatter@colby.edu
> -------------------------------------------------------------------
>
> _______________________________________________
> sqr-users mailing list
> sqr-users@sqrug.org
> http://www.sqrug.org/mailman/listinfo/sqr-users
> <http://www.sqrug.org/mailman/listinfo/sqr-users>
>
> _______________________________________________
> sqr-users mailing list
> sqr-users@sqrug.org
> http://www.sqrug.org/mailman/listinfo/sqr-users
> <http://www.sqrug.org/mailman/listinfo/sqr-users>
>
************************************************************************
If you have received this e-mail in error, please delete it and notify
the sender as soon as possible. The contents of this e-mail may be
confidential and the unauthorized use, copying, or dissemination of it
and any attachments to it, is prohibited.
Internet communications are not secure and Hyperion does not,
therefore, accept legal responsibility for the contents of this message
nor for any damage caused by viruses. The views expressed here do not
necessarily represent those of Hyperion.
For more information about Hyperion, please visit our Web site at
www.hyperion.com
_______________________________________________
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