[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: "Overcashier, Patricia" <Patricia.Overcashier@aam.com>
- Date: Fri, 13 Oct 2006 09:11:52 -0400
- Delivery-date: Fri, 13 Oct 2006 09:14:33 -0400
- In-reply-to: <BAY103-F233DBB65A0793ECE0333C1A50A0@phx.gbl>
- List-id: "This list is for discussion about the SQR database reportinglanguage from Hyperion Solutions." <sqr-users.sqrug.org>
- Thread-index: AcbuyHd5aNDC3wLTS2eAq9oxQm32RQAAC88A
- Thread-topic: [sqr-users] quickest way to count how many commas are in a string
The variable that I am dissecting does not come from a file.
I need to know how many columns are in the primary index for the record
name in the audit table.
Through a previous query, all of the column names of the primary index
for the record are in one variable.
I am splitting them out and then using them as separate columns in a
dynamic select statement.
Hope that helps clarify it.
-----Original Message-----
From: sqr-users-bounces+patricia.overcashier=aam.com@sqrug.org
[mailto:sqr-users-bounces+patricia.overcashier=aam.com@sqrug.org] On
Behalf Of the dragon
Sent: Friday, October 13, 2006 9:04 AM
To: sqr-users@sqrug.org
Subject: RE: [sqr-users] quickest way to count how many commas are in a
string
I guess my question is why would you need this? A comma deliminated
file
should always have the same number of commas in it, for every row. If
not,
you wouldn't really know what data goes with what variable anyway, and
that
statement goes if you don't know how many commas are in the row of data.
If I have the row Clark, the dragon, Willis, 48, PeopleSloth Admin and
any
of those commas were missing, I wouldn't know what values would get
placed
into the corresponding variables, because I would never know which comma
was
missing.
peace,
clark 'the dragon' willis
PSA: Salary <> Slavery. If you earn a salary, your employer is renting
your
services for 40 hours a week, not purchasing your soul. Your time is the
only real finite asset that you have, and once used it can never be
recovered, so don't waste it by giving it away.
I work to live; I don't live to work.
"Time is the coin of your life. It is the only coin you have, and only
you
can determine how it will be spent. Be careful lest you let other people
spend it for you."
Carl Sandburg
(1878 - 1967)
----Original Message Follows----
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!
_________________________________________________________________
The next generation of Search-say hello!
http://imagine-windowslive.com/minisites/searchlaunch/?locale=en-us&FORM
=WLMTAG
_______________________________________________
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