Gang:
I have two unrelated tables that contain dates and amounts. I would like to sum these amount and group by date but I am having problems doing it with a single query. I can do it using a temp table, but I would rather do it using a single query. Perhaps someone here can help.
sPayments has a date, amount, and payment number
pPayments has a date, amount, and payment number
sPayments.PaymentNumber never equals pPayments.PaymentNumber
I would like to add sPayments.amount and pPayments.amount and group them by date, so I only have two columsn returned: Date and Amount.
Any ideas?
I am currently selecting and grouping sPayments union pPayments into a temp table, then selecting that date and sum of amount, since the union query returns each date twice, with one amount for sPayments and one amount for pPayments.
Thanks,
Cybermud
I have two unrelated tables that contain dates and amounts. I would like to sum these amount and group by date but I am having problems doing it with a single query. I can do it using a temp table, but I would rather do it using a single query. Perhaps someone here can help.
sPayments has a date, amount, and payment number
pPayments has a date, amount, and payment number
sPayments.PaymentNumber never equals pPayments.PaymentNumber
I would like to add sPayments.amount and pPayments.amount and group them by date, so I only have two columsn returned: Date and Amount.
Any ideas?
I am currently selecting and grouping sPayments union pPayments into a temp table, then selecting that date and sum of amount, since the union query returns each date twice, with one amount for sPayments and one amount for pPayments.
Thanks,
Cybermud