Quantcast
Channel: Teradata Forums - All forums
Viewing all articles
Browse latest Browse all 27759

Please give syntax of scalar subquery to join three tables - response (1) by KS42982

$
0
0

As you haven't mentioned the table names or columns to join them, I have put generic query below. You can change it as per your requirements. Also, not sure why you want to use scalar subquery instead of outer joins.
SELECT t1.one
,(SELECT t2.two FROM TEST2 t2 WHERE t1.one=t2.two) t21
,(SELECT t3.three FROM TEST3 t3 WHERE t1.one=t3.three) t31
FROM TEST1 t1

 


Viewing all articles
Browse latest Browse all 27759

Trending Articles



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