SQL Clone
SQLServerCentral is supported by Redgate
Log in  ::  Register  ::  Not logged in

Get your favorite SSC scripts directly in SSMS with the free SQL Scripts addin. Search for scripts directly from SSMS, and instantly access any saved scripts in your SSC briefcase from the favorites tab.
Download now (direct download link)

Another way to get a table list from a string

By Bernabe Diaz,

the default delimiter is comma and the default list type is sysname.

You can pass whatever delimiter you want and ask for any datatype list.

Here is a sample of its use:

EXEC Usp_GetTableList @strDataSet='01/24/1965,1900-01-01 23:15:00.000,03/21/2009,1965,03/02/1975'


EXEC Usp_GetTableList @strDataSet='$45,50.639,60.1965,123456.9'


--,@delimiter ='.'

EXEC Usp_GetTableList @strDataSet='45,50.639,60.19651234569'


Enjoy it !

Total article views: 1443 | Views in the last 30 days: 1
Related Articles

Comma Delimited Conversion

Comma Delimited data


comma delimited name column

comma delimited name column


Get String between two delimiters

Get string between two delimiters


Delimited String Parser

Parses delimited string into a table of up to 9 varchar fields.