[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
RE: [sqr-users] Ltrim/Rtrim usage
- Subject: RE: [sqr-users] Ltrim/Rtrim usage
- From: Bob Stone <bstone@fastenal.com>
- Date: Tue, 30 Nov 2004 12:57:12 -0600
- Delivery-date: Tue, 30 Nov 2004 13:58:19 -0500
- List-id: "This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions." <sqr-users.sqrug.org>
unless I'm mistaken, I think rtrim($var, 'TAX') will trim the Ts, the As,
and the Xs as individual letters from the right...since ATAX is on the end,
it will trim all 4 off.
If you want to trim the exact word 'TAX', uh...i dunno. Perhaps you can
trim it off one at a time (X then A then T?), or maybe you can check if it
has 'TAX' in the word somewhere first and then trim X, A, T from the right.
Or you could check to see if 'TAX' is in it and do a substring, chopping off
the last 3 letters only.
-----Original Message-----
From: sqr-users-bounces+bstone=fastenal.com@sqrug.org
[mailto:sqr-users-bounces+bstone=fastenal.com@sqrug.org]On Behalf Of
Kaz.Narayanan@averydennison.com
Sent: Tuesday, November 30, 2004 12:29 PM
To: This list is for discussion about the SQR database reporting
language from Hyperion Solutions.
Subject: [sqr-users] Ltrim/Rtrim usage
Hi,
I am trying to trim a value 'TAX' in an SQR.
My codes are as follows:
let $document1 = ltrim($document , 'TAX')
let $document1 = Rtrim($document1 , 'TAX')
let $document1 = ltrim($document1 , ' ')
let $document1 = rtrim($document1 , ' ')
For Example if I have a value of '8710212004ATAX' in $document I want
$document1 to be '8710212004A' without the 'TAX'
however, the $document1 is also trimming the 'A' before the 'TAX'. I want
the
$document1 to be '8710212004A'
Am I doing anything wrong? Any Suggestions?
Thanks
Regards
KM Narayanan
-----------------------------------------
The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you received
this in error, please contact the sender and delete the material from any
computer.
_______________________________________________
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