AV1611 Posted March 13, 2006 Share Posted March 13, 2006 If I had two tables:Table A has some records that B doesn'tTable B has some records that A doesn'tI can do JOIN on FIELD1I want ALL records...Can't do left, can't do right... for obvious reasons... Quote Link to comment Share on other sites More sharing options...
obsidian Posted March 13, 2006 Share Posted March 13, 2006 you can do a simple query and join the records in the WHERE clause:[code]SELECT * FROM table1 a, table2 b WHERE a.field1 = b.field1;[/code] Quote Link to comment Share on other sites More sharing options...
AV1611 Posted March 13, 2006 Author Share Posted March 13, 2006 That won't do it because if A exists and B doesn't you won't get A and vice versa...[!--quoteo(post=354504:date=Mar 13 2006, 09:36 AM:name=obsidian)--][div class=\'quotetop\']QUOTE(obsidian @ Mar 13 2006, 09:36 AM) [snapback]354504[/snapback][/div][div class=\'quotemain\'][!--quotec--]you can do a simple query and join the records in the WHERE clause:[code]SELECT * FROM table1 a, table2 b WHERE a.field1 = b.field1;[/code][/quote] Quote Link to comment Share on other sites More sharing options...
obsidian Posted March 13, 2006 Share Posted March 13, 2006 [!--quoteo(post=354586:date=Mar 13 2006, 12:53 PM:name=AV1611)--][div class=\'quotetop\']QUOTE(AV1611 @ Mar 13 2006, 12:53 PM) [snapback]354586[/snapback][/div][div class=\'quotemain\'][!--quotec--]That won't do it because if A exists and B doesn't you won't get A and vice versa...[/quote]ah, i see what you're saying. did you try OUTER JOIN? Quote Link to comment Share on other sites More sharing options...
AV1611 Posted March 13, 2006 Author Share Posted March 13, 2006 Let me try outer joins... I've never used it... but this is a common problem for me.. THANKS! Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.