I want retrieve columns x,y,z. Where x and y are in both tables A and B but z is only in table B. Any ideas? I keep getting x and y are ambiguous.
Retrieve columns in multiple table where some columns are in both tables
Collapse
X
-
The problem is basically what I described in my first post. You need to qualify your tables. It doesn't know which table you want the x and y from. And if you want it from both tables, you need the include them twice, each qualified for the tables.
Also, you're doing a cartesian join, are you sure you want to do that? that will multiply every row from one table with every row from the other table. You need to join the table on the key field to prevent that.
If however you are looking to append the two separate sets of records together, then you need to use a UNION. You said it doesn't work because the data is too different. All you need to do then is make it the same by converting the data.Comment
Comment