Hi- I'm having a problem with a simple query:
-my problem is that I want everything from table1, plus anything from field2.wanted_field in a record that has a match in the comm_field fields. However, there's multiple entries for comm_field that match in both tables, but I only want one. Is this possible? I'd use SELECT DISTINCT, except that I can't because I'm returning table1.* so I'm unable to.
This is what I have:
SELECT table1.*, table2.wanted_field
FROM table1 LEFT OUTER JOIN table2
ON table1.comm_field = table2.comm_field
any help would be greatly appreciated!
-my problem is that I want everything from table1, plus anything from field2.wanted_field in a record that has a match in the comm_field fields. However, there's multiple entries for comm_field that match in both tables, but I only want one. Is this possible? I'd use SELECT DISTINCT, except that I can't because I'm returning table1.* so I'm unable to.
This is what I have:
SELECT table1.*, table2.wanted_field
FROM table1 LEFT OUTER JOIN table2
ON table1.comm_field = table2.comm_field
any help would be greatly appreciated!