[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
RE: [sqr-users] RAT in sqr - search char string for first pos of charstarting from the right?
- Subject: RE: [sqr-users] RAT in sqr - search char string for first pos of charstarting from the right?
- From: Paul Delange <Paul.Delange@cami.ca>
- Date: Wed, 22 Feb 2006 20:21:34 -0500
- Delivery-date: Wed, 22 Feb 2006 20:32:08 -0500
- In-reply-to: <D885330CF5F9B743BEE18016C6EF0FA7010A118B@NASTMEXM02.hyperion.com>
- List-id: "This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions." <sqr-users.sqrug.org>
Awesome!!
"Peter Burton"
<Peter_Burton@hyp
erion.com> To
Sent by: "This list is for discussion about
sqr-users-bounces the SQR database reportinglanguage
+paul.delange=cam from Hyperion Solutions."
i.ca@sqrug.org <sqr-users@sqrug.org>
cc
02/22/2006 05:42 Subject
PM RE: [sqr-users] RAT in sqr - search
char string for first pos of char
starting from the right?
Please respond to
"This list is for
discussion about
the SQR database
reporting
language from
Hyperion
Solutions."
<sqr-users@sqrug.
org>
Paul,
STRRCHR will return a 0 if the character is not found otherwise the
offset into the string.
Begin-Report
Let $String = 'c:\dir1\dir2\file.txt'
Do STRRCHR($String, '\', #Offset)
Show #Offset
End-Report
Begin-Procedure STRRCHR($String, $Char, :#Offset)
Let #OffSet = Instr(Edit($String, 'R'), $Char, 0)
If (#Offset)
Let #Offset = Length($String)-#Offset+1
End-If
End-Procedure
Peter
-----Original Message-----
From: sqr-users-bounces+peter_burton=hyperion.com@sqrug.org
[mailto:sqr-users-bounces+peter_burton=hyperion.com@sqrug.org] On Behalf
Of Paul Delange
Sent: Wednesday, February 22, 2006 5:29 PM
To: sqr-users@sqrug.org
Subject: [sqr-users] RAT in sqr - search char string for first pos of
char starting from the right?
Hi All,
How do I search a char string for the first occurance of a character
going
from right to left?
Example
c:\dir1\dir2\file.txt
How do I find the position of the THIRD \ (answer would be 12).
Thanks, Paul
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
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