Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Parameters to a table-type UDF
Message
 
À
Tous
Information générale
Forum:
Microsoft SQL Server
Catégorie:
Syntaxe SQL
Titre:
Parameters to a table-type UDF
Versions des environnements
SQL Server:
SQL Server 2005
Divers
Thread ID:
01171783
Message ID:
01171783
Vues:
40
I have created a UDF in SQL server 2005 that returns a table.

I need to pass a parameter to this UDF.

If I use this syntax, it is working as expected:
SELECT * FROM dbo.fnGetAdresseCorrespondance(8914)
But if I use this same UDF in a JOINed query and I pass a field from my first table like this:
select top 10 *
from Technicien AS T
left join dbo.fnGetAdresseCorrespondance(t.IdTechnicien) as Adr
on adr.IdTechnicien = t.IdTechnicien 
The error I receive is :

Msg 4104, Level 16, State 1, Line 1
The multi-part identifier "t.IdTechnicien" could not be bound.


Any ideas?
Éric Moreau, MCPD, Visual Developer - Visual Basic MVP
Conseiller Principal / Senior Consultant
Moer inc.
http://www.emoreau.com
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform