>Would this work
>insert into CartDetail CartContentID, CredID from (select @CartContentID as CartContentID, value as CreditID from fn_split)
If fn_split is a table-valued function, you would use this:
INSERT INTO cartDetail (...)
SELECT columnlist FROM dbo.fn_split()
I perfer to pass an XML fragment into the stored procedure instead of a string that contains comma-delimited items.
-Mike
>>You never assign the cartID back to the OUTPUT parameter.
>
>Thanks a million, I overlooked it. Now, what function can I use to scan through the table in SP?
>
>Thanks a lot again.
>
>Would this work
>insert into CartDetail CartContentID, CredID from (select @CartContentID as CartContentID, value as CreditID from fn_split)