Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Displaying results of a query in another query 1

Status
Not open for further replies.

AndyHorn

Technical User
Feb 12, 2003
49
GB
I have a query with the following fields:

AccountNumber, AccountName, NetTotal, Date

-----------------------------------------------
1234, ABCD, £1, 20064
5678, EFGH, £2, 20064
1234, ABCD, £3, 20065
5678, EFGH, £4, 20065
-----------------------------------------------

The date field is a result of a concatenation of the year and month, 'yyyym'.

The NetTotal is a sum of all Invoices within the specific yyyym for that Account Number.

An Account Number is listed for each month of each year, 'yyyym', where there were transactions.

I want to write another query based on this one that will show the following:

AccountNumber, AccountName, 20064, 20065, etc.
----------------------------------------------------

1234, ABCD, £1, £3
5678, EFGH, £2, £4
----------------------------------------------------

Is this possible in a query?

I hope that makes sense.
Maybe I'm going about it the wrong way. Any ideas welcome.

Thanks
 
Have you tried to follow the CrossTab query Wizard ?

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
Thanks PHV.

I've never used a CrossTab query before. It's done the trick.

Cheers
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top