Click here to monitor SSC
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)

SELECT using List of IDs

By Dmitri Bobkov,

Sometimes you have to deal with denormalized database.
And specially when links to another table are stored in one
of the fields as comma delimited list of IDs.
This script shows how to make a single SELECT statement to fetch linked records

Total article views: 250 | Views in the last 30 days: 2