Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Calling a UDF - Getting An Error - Part 2
Message
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Divers
Thread ID:
01326464
Message ID:
01326472
Vues:
14
>>I wrote another UDF to convert a comma delimited list of string values to a table. When I call it, I get "Invalid object name 'TranCodes'". The error is occuring on the last query:
>>
>>
>>
>>DECLARE @sTransTypeCodes varchar(50)
>>SET @sTransTypeCodes = 'PR,PD'
>>
>>
>>
>>SELECT *
>> 	FROM Transactions
>>	WHERE sTrans_Type_CD IN
>>		(SELECT DataItems FROM TranCodes)
>>
>
>I prefer JOIN syntax :
>
>SELECT *
>       FROM Transactions
>INNER JOIN (SELECT DataItems FROM udfParseCommaListToTable(@sTransTypeCodes, ',') AS TranCodes
>      ON Transactions.sTrans_Type_CD = TranCodes.DataItems
>
Me too, but we're both too late :) No way competing with Sergey.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform