Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Parameters to a table-type UDF
Message
 
To
All
General information
Forum:
Microsoft SQL Server
Category:
SQL syntax
Title:
Parameters to a table-type UDF
Environment versions
SQL Server:
SQL Server 2005
Miscellaneous
Thread ID:
01171783
Message ID:
01171783
Views:
39
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
Next
Reply
Map
View

Click here to load this message in the networking platform