Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

function returning table

Status
Not open for further replies.

liuk

Programmer
Jan 16, 2006
54
0
0
IT
Hi
How is it possible to join a function returnin a table with a table?

If i write :

Select Document.IdDoc, F.Id
From Document inner join dbo.FNC_GetData(Document.IdDoc) F on Document.IdDoc = F.IdDoc

i get an error "Incorrect syntax near '.'"

If i write
Select Document.IdDoc, F.Id
From Document inner join dbo.FNC_GetData(IdDoc) F on Document.IdDoc = F.IdDoc

i get an error
'IdDoc' is not a recognized OPTIMIZER LOCK HINTS option.

Someone could help me?
thanks
 
Why not have your proc dump results in a temp table, join to this, then after you are done querying it drop the table?

HTH,

Alex

It's a magical time of year in Philadelphia. Eagles training camp marks the end of another brutal season of complaining about the Phillies.
 
The function parameter is a field of the other joining table.
Someone could tell me why it doesn't works?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top