Questions

Answer for:

SQL Server: Join two tables returning only one row from the second table

Message 6 of 6

View entire thread
+
0 Votes
axesharpeye

Thanks for your reply! Your first query above got it working.

SELECT A.Name, B.Country
FROM TABLE1 A
INNER JOIN (SELECT IDadd,MIN(Name) Name FROM TABLE2 GROUP BY IDadd) AS B
ON B.IDadd = A.ID