Subject | Is it possible to do this query? |
---|---|
Author | Anthony Tanas |
Post date | 2006-03-11T20:23:05Z |
Is it possible to perform a select where the data rows returned are
different fields from different tables?
I want to do like a transaction activity report that would have data from
two tables - a billing table and a payment table.
So I'll slightly simplify my situation in this example:
BILLING
---------
BILLINGID
BILLINGDATE
BILLINGCODE
BILLINGAMOUNT
PAYMENT
--------
PAYMENTID
PAYMENTDATE
PAYMENTCODE
PAYMENTAMOUNT
So I'd like results something like:
BILL1,JAN1,BILLCODE1,100
PAY1,JAN2,PAYCODE1,50
PAY2,JAN3,PAYCODE1,50
BILL2,FEB1,BILLCODE1,100
PAY3,FEB2,PAYCODE1,50
And so forth...is such a thing possible?
different fields from different tables?
I want to do like a transaction activity report that would have data from
two tables - a billing table and a payment table.
So I'll slightly simplify my situation in this example:
BILLING
---------
BILLINGID
BILLINGDATE
BILLINGCODE
BILLINGAMOUNT
PAYMENT
--------
PAYMENTID
PAYMENTDATE
PAYMENTCODE
PAYMENTAMOUNT
So I'd like results something like:
BILL1,JAN1,BILLCODE1,100
PAY1,JAN2,PAYCODE1,50
PAY2,JAN3,PAYCODE1,50
BILL2,FEB1,BILLCODE1,100
PAY3,FEB2,PAYCODE1,50
And so forth...is such a thing possible?