I would appreciate help with the following SQL problem. I have 2 tables as follows:[code]Test_1:
id Test_1_id Comment Finished
1 a Test a
2 b Test b1 Y
3 b Test b2
[/code]I want to join the tables together to get the following result:[code]id Finished
c[/code]What I’m trying to do is return all the values from table Test_1, along with the value of Finished (if any) from table Test_2. The problem I have is picking out the entry with a value for Finished for ‘b’ in preference to the entry with no value for Finished.
If I try a standard join like
FROM test_1 LEFT JOIN test_2
ON Test_1.id=test_2.test_1_idI get the following resultset:[code]id Finished
c NULL[/code]Any ideas?