Create merged fields from multiple queries

G

Guest

How can I create one "REFERENCE" column/field from two different subqueries?

Query1 and Query2 fields are as follows:
PART.Query1 PART.Query2
WOPO.Query1 WOPO.Query2
DUE_BY.Query1 DUE_BY.Query2
NO_UNITS.Query1 NO_UNITS.Query2

The only constant between the two queries is PART number where the values
would be equal to one another, but for the other three fields WOPO, DUE_BY,
NO_UNITS I need to display all records from each query into the new fields
like:
WOPO_REF, DUE_BY_REF, NO_UNITS_REF. I tried the usually inner and outer
joins but it's just not working. Any suggestions?
 
G

Guest

Answered my own question. I was almost there but didn't know how to tie it
together but if anyone else is wondering this is how:

Create a UNION Query:
SELECT [PART],[QTY_ONHAND],[WOPO_NUM],[DUE_BY],[NO_UNITS] FROM
SupAndDemand_WOInfo UNION SELECT
[PART],[QTY_ONHAND],[WOPO_NUM],[DUE_BY],[NO_UNITS] FROM SupAndDemand_POInfo
ORDER BY [DUE_BY];

my query orders the records by DUE_BY date.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top