>Nadya,
>
>There's nor CredID in your code.
>
I meant CreditID:
INSERT INTO CartDetail (CartContentID, CreditID)
SELECT @CartContentID , value
FROM fn_Split(@tcListOfCodes,',')
It works, but I assume, value is char and CreditID is int. Anyway, no errors and values are inserted correctly.
If it's not broken, fix it until it is.
My Blog