[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: [sqr-users] how to remove a single quote from a name
- Subject: Re: [sqr-users] how to remove a single quote from a name
- From: JOHN_HARRIS@qvc.com
- Date: Fri, 27 Oct 2006 20:38:41 -0400
- Delivery-date: Fri, 27 Oct 2006 22:53:48 -0400
- In-reply-to: <s53df32e.092@mailhost.vac-acc.gc.ca>
- List-id: "This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions." <sqr-users.sqrug.org>
Try this:
repla Inspects the contents of source_value and replaces all occurrences
ce of from_string with to_string and returns the modified string.
Syntax: dst_var = replace(source_value, from_string, to_string)
source_value = date or text literal, column, variable, or
expression
from_string = text literal, column, variable, or expression
to_string = text literal, column, variable, or expression
dst_var = text variable
Example: let $replaced = replace($paragraph, `good', `excellent')
let $q = chr(39)
let $null = ''
let $lname = replace($lname,$q,$null)
Any questions, please call or email
me
Thank you.
Regards,
John
(Embedded image moved to file: John Harris
pic25128.jpg) Programmer/Analyst
Application Development -
Internal
QVC Inc., 1200 Wilson Drive, MC 220, West Chester, PA 19380-4262
Telephone 484-701-3303
Fax 484-701-8437
e-mail jharris@qvc.com
This message may contain information that is privileged or confidential.
This message may contain information that is privileged or confidential. If
you are not the intended recipient, you are hereby notified that any
disclosure, copying, distribution, or use of the information contained
herein is STRICTLY PROHIBITED. If you received this transmission in error,
please immediately contact the sender and destroy the material in its
entirety, whether in electronic or hard copy format.
"PeterG Clark"
<PeterG.Clark@vac
-acc.gc.ca> To
Ext: <sqr-users@sqrug.org>
Sent by: cc
sqr-users-bounces
+john_harris=qvc. Subject
com@sqrug.org Re: [sqr-users] how to remove a
single quote from a name
10/27/2006 05:14
PM
Please respond to
"This list is for
discussion about
the SQR database
reporting
language from
Hyperion
Solutions."
<sqr-users@sqrug.
org>
I think you can use the translate for that as well:
let $q = chr(39)
let $null = ''
let $lname = translate($lname,$q,$null)
I haven't tested it, but give it a shot :-)
>>> Patricia.Overcashier@aam.com 2006/10/17 13:30:28 >>>
Hi everyone,
I select a last name and before comparing it I remove all special
characters.
Thanks to all of your help, I can do that successfully.
The only character that I seem to struggle with removing is the single
quote
I have the name O'Hara
I want it to be OHara
I am using translate to remove all of the other oddities.
let $lname = translate(lower($lname),'абвзийксуцн','aaaceeenooi')
I have tried this:
find ''' in $lname 0 #pos My errors happen here. I can't find
the single quote to get rid of it.
if #pos > 0
let #pso2 = #pos + 1
let $newlname = substr(lname,0,#pos)||substr($lname,#pos2)
end-if
Thanks again,
Patti Overcashier
Information Technology - PeopleSoft
American Axle & Manufacturing, Inc.
Detroit Gear Plant 3
1840 Holbrook
Detroit, MI 48212
_______________________________________________
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
Here was a non admissible message part of 'image/jpeg' MIME type. It
has been automatically discarded before sending the message to the
list.
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users