It depends if you need to do any intermediate processing on the recordset returned. If not, then derived table will be the best.
>is one way preferable over the other?
>
>
>>The first select does not create a table with name TranCodes but just a recordset that is not accessible from T-SQL. You can either create a temp table, put result into a table variable or use derived table as shown below
>>
>>SELECT *
>> FROM Transactions
>> WHERE sTrans_Type_CD IN
>> (SELECT DataItems FROM SELECT * FROM udfParseCommaListToTable(@sTransTypeCodes, ','))
>>
--sb--