Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 Tabular function in a join

Author  Topic 

Jas Jr
Starting Member

5 Posts

Posted - 2012-01-31 : 04:28:29
Hi All,

Can anyone please tell me that if a tabular function can be used in a join. If an example is posted for this query then it would be a great help. Thanks in advance.

ditch
Master Smack Fu Yak Hacker

1466 Posts

Posted - 2012-01-31 : 06:34:02
assuming the tabular function returns a column called ReturnValue - this should do it:

Select Column1, column2 from yourtable
join YourTabularFunction(Column3) dv
on dv.ReturnValue = Column1

Duane.
Go to Top of Page

Jas Jr
Starting Member

5 Posts

Posted - 2012-02-01 : 02:40:21
Thanks for the response i will try this stuff surely.
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-02-01 : 09:28:45
you cant pass columns inside function from left side table using a join. you need cross apply/outer apply for that

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -