!! WARNING - LONG POST!!
I'm having a few issues with a database I've set up....
Each week I receive downloaded data in Excel - this is supplied to us in a pre-defined format from our client(s) (the data is actually timesheet information for Contractors)
When we receive the data, it arrives as one 'row' per timesheet, and then as well as the info about the contractor, one column for each possible rate, and one column for each no of hours claimed. There are over 70 different rate / hours codes, so the spreadsheet has over 150 columns, the majority of which have 0 in them!
What I need to do is to transform the data into a different format - like the report in the attached file.
To do this, I am currently using the spreadsheet as a Linked Table in my database, and using various queries (including a couple of union queries) to swap it around into the relevant format.
The way I'm doing it now works absolutely fine - until the information on the spreadsheet is changed (rates or hours are added, deleted or renamed) - and then I have to go through and redo it all again!
So, my question is:
Is there a way of examining the field names, and creating the values I need from them?
On the spreadsheet, when looking at a particular rate code eg [Overtime Weekend Daily/Day], there are 2 columns I need to look at and 'match' to each other - one for the Rate: Bill Rate [Overtime Weekend Daily/Day] and one for the hours / days claimed: Time Sheet Billable Hours [Overtime Weekend Daily/Day]
On the report, these would need to be shown as
RateType: "Overtime Weekend Daily"
RateCategory: "Day"
Rate: Bill Rate [Overtime Weekend Daily/Day]
Billable: Time Sheet Billable Hours [Overtime Weekend Daily/Day]
... or is there another way altogether that I could do this?
The ZIP file contains a stripped down copy of the database and a sample spreadsheet - just reattach the spreadsheet once you've downloaded it, call it Timesheets, and it should all work!
I'm having a few issues with a database I've set up....
Each week I receive downloaded data in Excel - this is supplied to us in a pre-defined format from our client(s) (the data is actually timesheet information for Contractors)
When we receive the data, it arrives as one 'row' per timesheet, and then as well as the info about the contractor, one column for each possible rate, and one column for each no of hours claimed. There are over 70 different rate / hours codes, so the spreadsheet has over 150 columns, the majority of which have 0 in them!
What I need to do is to transform the data into a different format - like the report in the attached file.
To do this, I am currently using the spreadsheet as a Linked Table in my database, and using various queries (including a couple of union queries) to swap it around into the relevant format.
The way I'm doing it now works absolutely fine - until the information on the spreadsheet is changed (rates or hours are added, deleted or renamed) - and then I have to go through and redo it all again!
So, my question is:
Is there a way of examining the field names, and creating the values I need from them?
On the spreadsheet, when looking at a particular rate code eg [Overtime Weekend Daily/Day], there are 2 columns I need to look at and 'match' to each other - one for the Rate: Bill Rate [Overtime Weekend Daily/Day] and one for the hours / days claimed: Time Sheet Billable Hours [Overtime Weekend Daily/Day]
On the report, these would need to be shown as
RateType: "Overtime Weekend Daily"
RateCategory: "Day"
Rate: Bill Rate [Overtime Weekend Daily/Day]
Billable: Time Sheet Billable Hours [Overtime Weekend Daily/Day]
... or is there another way altogether that I could do this?
The ZIP file contains a stripped down copy of the database and a sample spreadsheet - just reattach the spreadsheet once you've downloaded it, call it Timesheets, and it should all work!