Crosstab Query Top 5 Columns

  • Thread starter Thread starter maindaco via AccessMonster.com
  • Start date Start date
M

maindaco via AccessMonster.com

Having a Crosstab query where columns heading are dates... how can I make it
only display last 5 days columns? Take into consideration that I'm not
including weekends.. any help will be really appreciated
 
Use a select query as source for the crosstab and set order of date to DESC
and TOP 5.
 
i am sorry i ask my question here, but i cannot ask questions

I have dataset like this:

ID region region-start-date
1 NA june,1,2002
1 WE july,1,2002
2 NA may,1,2002
3 NA may,1,2002
3 WE june,1,2002
3 ME july,1,2002

I need to get a table like the following:

ID firstregion secondregion thirdregion.........sixthregion
firststartdate......sixthstartdate
1 NA WE . ..... june,1,2002
july.1.2002 . .....
2 NA . . ..... may,1,2002
. . ....
3 NA WE ME ..... may,1,2002
june,1,2002 july,1,2002 ....


any ideas, thanks in advance
 
i am sorry i ask my question here, but i cannot ask questions

I have dataset like this:

ID region region-start-date
1 NA june,1,2002
1 WE july,1,2002
2 NA may,1,2002
3 NA may,1,2002
3 WE june,1,2002
3 ME july,1,2002

I need to get a table like the following:

ID firstregion secondregion thirdregion.........sixthregion
firststartdate......sixthstartdate
1 NA WE . ..... june,1,2002
july.1.2002 . .....
2 NA . . ..... may,1,2002
. . ....
3 NA WE ME ..... may,1,2002
june,1,2002 july,1,2002 ....

A Crosstab query will work for you here. Use the Crosstab Query
wizard; use ID as the "row header", Region as the "column header".

John W. Vinson[MVP]
 
thank you very much. Maybe I should give more specifics. The idea is to sort
the region according to the region start date for each trial. The result
intended is a table which have six new column: firstregion is the first
region(according to strating date) for each trial. secondregion is the second
region for each trial, and so on and so forth. Similarly six new column for
start date is needed. the first column is the start date of the first region
for each trial, the second column is the start date of the second region for
each trial, and so on and so forth.
 
Back
Top