SyntaxFix
Write A Post
Hire A Developer
Questions
here is another easier option
select to_number(column_value) as IDs from xmltable('1,2,3,4,5');