Combine 2 Series for Chart

G

Guest

I have the following 2 tables (T1, T2):

T1.Date T1.Ratio1
1/31/07 .5
2/28/07 .7
3/31/07 .2
....

T2.Date T2.Ratio2
1/15/07 .4
2/15/07 .6
3/15/07 .1
....

I would like to combine these two tables for charting purposes (x-axis:
Date; y-axis: Ratio1 & Ratio 2. I think the query result should look like
this:

Date Ratio1 Ratio2
1/15/07 .4
1/31/07 .5
2/15/07 .6
2/28/07 .7
3/15/07 .1
3/31/07 .2

I haven't been able to get this output in a query. If anyone knows an
easier way to chart this, please let me know. Thanks in advance for any
help...

-jeff
 
G

Guest

Try this ---
SELECT TableA.YourDate, TableA.Ratio1, Null AS Ratio2
FROM TableA
UNION ALL SELECT TableB.YourDate, Null AS Ratio1, TableB.Ratio2
FROM TableB;
 

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