Combining UNION and INSERT queries
I want to use the result of a UNION query as the source of an INSERT INTO query. I've found similar things on this very forum - like here, but I get a syntax error with all variations I try.
Anyone tell me what's wrong with this:
INSERT INTO tblTEMP (X,Y)
SELECT E1 AS X,N1 AS Y
FROM tblConnections
UNION
SELECT E2 AS X,N2 AS Y
FROM tblConnections;
I get a "Syntax error in the FROM clause".
The E1, N1, E2, N2 fields of tblConnections are the same type as the X and Y fields of tblTemp.
I can get around it by separating it into 2 queries, but I'd like to know why it's not working like this!
Grrrrrrrr.