>>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.
Sql Server can do imlicit conversion between different data types. The
CAST and CONVERT in BOL has a matrix of allowed conversions between data types.
--sb--