I have a function that returns a string of order numbers delimited with ';'
SELECT dbo.getSOs(121616) returns string of orders for the input customer 121616
"123;345;456;678;"
I am trying to using the Split function from
http://qa.sqlservercentral.com/scripts/contributions/225.asp
to return a table of ints. Both functions independly work fine
SELECT * FROM dbo.SplitToInt("123;345;456;678;",";") return a table of ints.
When I run this query (for Customer 121616)
SELECT * FROM dbo.SplitToInt(dbo.getSOs(121616),';')
I get an error "Incorrect syntax near '.'"
What am I doing wrong ?