Selecting all columns after a specific number of columns from a cross tab query

accessaspire219

Registered User.
Local time
Today, 00:34
Joined
Jan 16, 2009
Messages
126
Hi,
I have a cross tab query that is based on monthly data. I have another select query based off of the crosstab query. At the end of each month the crosstab query gets a new column with the data for that month. The crosstab query also has details such as name, type etc in addition to the monthly data. I need to write SQL such that it will always ignore the initital 4 columns and select ALL columns after the 4 initials columns.

Does anyone know how this can be done?

Appreciate your help,
Thanks!
 
Just tried something, maybe it will work for you, I don't know. But if you create a copy of the existing crosstab query but set your 4 row headings to not shown the grouping will still be achieved but the columns are hidden. So your other query will not need to worry about the first 4 columns it will simply select all columns in the crosstab query.

Try it.

David
 

Users who are viewing this thread

Back
Top Bottom