November 7, 2005 at 1:23 pm
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://www.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 ?
November 7, 2005 at 2:44 pm
You cannot use function call as a parameter for anither function. It's wrong syntax.
DECLARE @String varchar(100)
SELECT @String =dbo.getSOs(121616)
SELECT * FROM dbo.SplitToInt(@String,';')
_____________
Code for TallyGenerator
Viewing 2 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply