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:
01326536
Vues:
14
>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, ','))
>
Sergey,

I believe that
SELECT *
 	FROM Transactions
	WHERE sTrans_Type_CD IN
		(SELECT DataItems FROM udfParseCommaListToTable(@sTransTypeCodes, ','))
would work the same (actually, I'm not even sure that the first syntax would work at all).

Still INNER JOIN is better, IMO.
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