Marten Lehmann wrote:
Quote:
Both tables can contain records with the same id. It may be, that there
is a record for a certain id in both tables, or only in table1 or only
in table2. I know how to do this if table1 contains the records in every
case in table2 only in certain cases so I can use a left outer join. But
what does the query have to look like, if this can happen for both tables? |
Please, always post the version and build number of SQL Anywhere that
you are using.
Take a look at FULL OUTER JOIN. In the SQL Anywhere 9.x online docs, see:
ASA SQL User's Guide
Joins: Retrieving Data from Several Tables
Inner and outer joins
- Outer joins
greg.fenton
--
Greg Fenton
Consultant, Solution Services, iAnywhere Solutions
--------
Visit the iAnywhere Solutions Developer Community
Whitepapers, TechDocs, Downloads
http://www.ianywhere.com/developer/