Sample Header Ad - 728x90

SQL - Convert text to a list of numeric values

2 votes
3 answers
11370 views
Looking for SQL code to transform the text string '12,13,14' to this list of numbers +----+ | 12 | +----+ | 13 | +----+ | 14 | +----+ Example: * table0.params (varchar) field contains this text: 12,13,14 * table1 has column ID (numeric). I would like to form a query along the lines of: SELECT * FROM table1 WHERE ID in table0.params I am using Microsoft SQL Server Standard Edition (64-bit) version 10.50.1600.1
Asked by Stefan Colosimo (29 rep)
Sep 11, 2017, 02:37 PM
Last activity: Apr 21, 2020, 01:48 PM