[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
RE: [sqr-users] quickest way to count how many commas are in a string
- Subject: RE: [sqr-users] quickest way to count how many commas are in a string
- From: <R.Kaushik@iflexsolutions.com>
- Date: Fri, 13 Oct 2006 18:21:07 +0530
- Delivery-date: Fri, 13 Oct 2006 08:55:20 -0400
- Importance: normal
- List-id: "This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions." <sqr-users.sqrug.org>
- Priority: normal
- Thread-index: Acbuv/nP8Zuh3GDjQZ++rWMZq5GBFwAAbexwAACN9RAAAJJjMA==
- Thread-topic: [sqr-users] quickest way to count how many commas are in a string
Cool Trick...
Kaushik
-----Original Message-----
From: sqr-users-bounces+r.kaushik=iflexsolutions.com@sqrug.org
[mailto:sqr-users-bounces+r.kaushik=iflexsolutions.com@sqrug.org] On
Behalf Of Peter Burton
Sent: Friday, October 13, 2006 6:05 PM
To: This list is for discussion about the SQR database reportinglanguage
fromHyperion Solutions.
Subject: RE: [sqr-users] quickest way to count how many commas are in a
string
Don,
Good idea ..
Begin-Report
Input $A
Let #C = Length($A) - Length(Replace($A, ',', ''))
Show #C
End-Report
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 Simpson, Don I (UK)
Sent: Friday, October 13, 2006 8:21 AM
To: This list is for discussion about the SQR database reportinglanguage
fromHyperion Solutions.
Subject: RE: [sqr-users] quickest way to count how many commas are in a
string
I haven't tried this myself, but it should/might work.
Copy your string into a second temporary variable. Do a REPLACE on this
string to change all ',' to '' (null). Get the length of your original
and the "replaced" temporary string. The difference in length is the
number of commas.
Regards,
Don Simpson
BAE Systems
-----Original Message-----
From: sqr-users-bounces+don.i.simpson=baesystems.com@sqrug.org
[mailto:sqr-users-bounces+don.i.simpson=baesystems.com@sqrug.org] On
Behalf Of Overcashier, Patricia
Sent: 13 October 2006 13:06
To: This list is for discussion about the SQR database reportinglanguage
fromHyperion Solutions.
Subject: [sqr-users] quickest way to count how many commas are in a
string
*** WARNING ***
This mail has originated outside your organization, either from an
external partner or the Global Internet.
Keep this in mind if you answer this message.
I have a string called $selectlist
I need to know how many commas are in it.
Once I know I can unstring it by commas into the right number of
variables and then use those variables What is the simplest way to get a
count of the commas?
Thanks!
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users
********************************************************************
This email and any attachments are confidential to the intended
recipient and may also be privileged. If you are not the intended
recipient please delete it from your system and notify the sender.
You should not copy it or use it for any purpose nor disclose or
distribute its contents to any other person.
********************************************************************
_______________________________________________
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
DISCLAIMER:
This message contains privileged and confidential information and is intended
only for the individual named.If you are not the intended recipient you should
not disseminate,distribute,store,print, copy or deliver this message.Please
notify the sender immediately by e-mail if you have received this e-mail by
mistake and delete this e-mail from your system.E-mail transmission cannot be
guaranteed to be secure or error-free as information could be
intercepted,corrupted,lost,destroyed,arrive late or incomplete or contain
viruses.The sender therefore does not accept liability for any errors or
omissions in the contents of this message which arise as a result of e-mail
transmission. If verification is required please request a hard-copy version.
_______________________________________________
sqr-users mailing list
sqr-users@sqrug.org
http://www.sqrug.org/mailman/listinfo/sqr-users