[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: "Simpson, Don I \(UK\)" <Don.I.Simpson@baesystems.com>
- Date: Fri, 13 Oct 2006 13:20:43 +0100
- Delivery-date: Fri, 13 Oct 2006 08:24:53 -0400
- List-id: "This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions." <sqr-users.sqrug.org>
- Thread-index: Acbuv/nP8Zuh3GDjQZ++rWMZq5GBFwAAbexw
- Thread-topic: [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