Site Sponsored By: SQLDSC - SQL Server Desired State Configuration
Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
I am using Transact SQL to pull some data for a report. One of my columns of data has a comma separated list of pkeys from another table. I want to get a List Length (ListLen() in Coldfusion) of the list in each column. Is there ANY way to do all that in Transact SQL??So a few columns of data might look like this (one line is one record):23, 234, 873, 1047, 2312, 4554, 651, 23, 12765987, 456, 21So I eventually want a SUM() of the number of items. So using the dummy data above, a sum of the items would be 14 (Rec1 has 6 items, Rec2 has 4 items, Rec3 has 1 items, Rec4 has 3 items).------------------------------------Phil Molaro - pmolaro@gmail.com------------------------------------