A
Andrew
I have two queries i need to bring together. Do I need a union and how
would i go about it?
Query 1
ID
CostSource
1999
2000
Query 2
ID
EstimateSource
1999
2000
Where CostSource and EstimateSource are the same type of field. Both ID
fields have the same type as well. I need to bring together both sources
into one field with their corresponding data.
Example:
Query1
ID |CostSource |Cost1999 |Cost2000
222 |Cost-Share |$256
222 |Maintenance |$987 |$980
255 |Cost-Share |$523
Query2
ID |EstimateSource |Est1999 |Est2000
222 |Maintenance |$890
255 |Cost-Share |$256
255 |Maintenance |$564 |$122
Output
ID |Sources |Cost1999 |Est1999 |Cost2000 |Est2000
222 |Cost-Share |$256
222 |Maintenance |$987 |$890 |$980
255 |Cost-Share |$523 |$256
255 |Maintenance| | $264 | | $122
I Can't figure out how to group the sources together with the corresponding
data.
This query is going to end up as a report.
would i go about it?
Query 1
ID
CostSource
1999
2000
Query 2
ID
EstimateSource
1999
2000
Where CostSource and EstimateSource are the same type of field. Both ID
fields have the same type as well. I need to bring together both sources
into one field with their corresponding data.
Example:
Query1
ID |CostSource |Cost1999 |Cost2000
222 |Cost-Share |$256
222 |Maintenance |$987 |$980
255 |Cost-Share |$523
Query2
ID |EstimateSource |Est1999 |Est2000
222 |Maintenance |$890
255 |Cost-Share |$256
255 |Maintenance |$564 |$122
Output
ID |Sources |Cost1999 |Est1999 |Cost2000 |Est2000
222 |Cost-Share |$256
222 |Maintenance |$987 |$890 |$980
255 |Cost-Share |$523 |$256
255 |Maintenance| | $264 | | $122
I Can't figure out how to group the sources together with the corresponding
data.
This query is going to end up as a report.