Celeste025
Technical User
I am having trouble creating a union query statement. I have this:
UNION SELECT [Tracking Number] FROM [Sales]; UNION SELECT [Tracking Number] FROM [Purchasing]; UNION SELECT [Tracking Number] FROM [Operations]; UNION SELECT [Tracking Number] FROM [Jobber];
But I get this error:
Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'
I am trying to create a query that takes columns which have the same label from 4 different tables into one query.
The database is set up to follow tracking numbers; the sales, purchasing and operations tables can only have a tracking number appear once, but the jobber table can have the same tracking number repeat up to 5 times. However, in my current non-union query, Im getting tracking numbers in the sales, etc. columns if there is one in the tracking number column, even if it's not in the actual table like that.
Thanks in advance
UNION SELECT [Tracking Number] FROM [Sales]; UNION SELECT [Tracking Number] FROM [Purchasing]; UNION SELECT [Tracking Number] FROM [Operations]; UNION SELECT [Tracking Number] FROM [Jobber];
But I get this error:
Invalid SQL statement; expected 'DELETE', 'INSERT', 'PROCEDURE', 'SELECT', or 'UPDATE'
I am trying to create a query that takes columns which have the same label from 4 different tables into one query.
The database is set up to follow tracking numbers; the sales, purchasing and operations tables can only have a tracking number appear once, but the jobber table can have the same tracking number repeat up to 5 times. However, in my current non-union query, Im getting tracking numbers in the sales, etc. columns if there is one in the tracking number column, even if it's not in the actual table like that.
Thanks in advance