Quantcast
Channel: Transact-SQL forum
Viewing all articles
Browse latest Browse all 23857

latest data from the join tables

$
0
0

I have more than 20 tables joined in the query and need to get the latest date data from the left outer joined tables..

Ex: select a.id,a.name,b.phoneno,c.address1,d.address2 from emp a left outer join emp_det b on a.id=b.id left outer join emp_det1 c on c.id=a.id left outer emp_det2 d on a.id=d.id..

I need the latest record from the tables emp_det, emp_det1, emp_det2, have latestdateupdate datetime field in all the tables.

Thanks in advance.


Viewing all articles
Browse latest Browse all 23857

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>