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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to get this transform into a report

Status
Not open for further replies.

Soundsmith

Programmer
Feb 21, 2001
84
US
I have a TRANSFORM that must be run monthly to generate a YTD report. Every fiscal year will begin with July, and July's report will contain data only in one column, each month adds an additional column of valid numbers.

I create a table of current "serv_date" values (like 200207, 200208, etc.) and create a table "tblSumPay" with serv_code, totCost and those values as field names, but how do I get this query into that table so I can run the report against it? The field names will change over time, but I think I can handle that part. I jsut need to get the query results into this table.

I've tried INSERT INTO tblSumPay transform..., etc. but it generates errors.
Here's the transform statement:

Code:
TRANSFORM Sum([tblBySsn].[cost]) AS SumOfcost SELECT [tblBySsn].[serv_code], Sum([tblBySsn].[cost]) AS [Total Of cost] FROM tblBySsn GROUP BY [tblBySsn].[serv_code] PIVOT [tblBySsn].[serv_date]

Serv_code values are text that look like 2.3, 3.1, etc.

If someone can point me to a way to get this TRANSFORM into the "tblSumPay" table, I can do the rest.

Thanks David 'Dasher' Kempton
The Soundsmith
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top