General information
Category:
Coding, syntax & commands
Thanks Eric!
You're absolutely right!
>The UNION operator will not match fields from table. It will only append the result of the second SELECT to the first.
>For example, if you have record A, B and C in the OLD_TABLE and C, D and E in the NEW_TABLE, you will get A, B, C, D, E if you use the UNION (or A, B, C, C, D, E if you use UNION ALL).
>I think that what you need is a JOIN:
SELECT *
FROM Original_table AS O
INNER JOIN New_table AS N
ON N.JoinedField = O.JoinedField
>Notice that you will need a field (JoinedField - normally a primary key) that has the same value in both table to be able to join them.
Previous
Reply
View the map of this thread
View the map of this thread starting from this message only
View all messages of this thread
View all messages of this thread starting from this message only