1. Help need to split comma separated string into distinct values and count for each
Platform: SQL Server 2000 - ASP application
Any help on this would be much appreaciated.
I have a table with a column that has comma separated values inserted
from a web form that allows the selection of a predefined list of
multiple items. In addition a user can add their own unique values in
an "other" text box which get appended to the selection of the muliple
list box. The results look like the ouput below in the table after the
insert. Where there may be one value or a comma separated list where
some elements are predefined choices and some are user defined
additions to the comma separated list. I had a feeling this was going
to bite me at the point when i needed to aggregate those values
(COUNT) individually.
I have looked at an SP from MSDN called Fn_Split() to help but could
not get it to work correctly.
trying to help a non-profit for at risk kids convert some data to help
with their funding, but this one is beyond me.
Thanks,
Max
The output of the column
ChildPCGovAID
-------------------------------------------
Food stamps
Food stamps, Medical
Food stamps, Medical, Child care subsidy
Food stamps, Medical, Child care subsidy, Public housing/Section 8
Food stamps, Medical, Child care subsidy, Public housing/Section 8
Food stamps, Medical, Child care subsidy, Public housing/Section 8
Food stamps, Medical, Child care subsidy, Public housing/Section 8
Food stamps, Medical, Child care subsidy, Public housing/Section 8
Food stamps, Medical, SSI
Food stamps, Medical, SSI
Food stamps, Medical, TANF, Child care subsidy, Public housing/Section
8
Food stamps, Medical, TANF, SSI , wic
Food stamps, Medical, TANF, wic
Food stamps, Medical, wic
Food stamps, Medical, wic
Need something like this as the output
Food stamps 15
Medical 15
Child care subsidy 7
WIC 4
Thanks again
2. Oracle Objects for OLE - runtime error 2827
3. splitting non-delimited string
4. @Datetime in concatenated Select
5. bcp comma-delimited files with quoted strings ?
6. First N records in SELECT
7. How to loop the comma delimited string in SP
8. GI-Hypertext Mailing List
9. Rows to Comma-Delimited String in SP?
10. Use a comma-delimited string for IN operator
11. Insert a comma delimited string into a table
12. Looping through Comma Delimited String
13. Insert Values from a Comma delimited variable string?