Custom Sort in a Crosstab Query

G

Guest

I'm setting up a query to export data that conforms to an excel spreadsheet
provided by my boss.

It'll be a crosstab query, with time values as column headings, and the row
headings are Date, and Machine Type. Unfortunately, the format I need to
conform to is this:

Date: MachType: 8:00AM 10:00AM ...
10/6/04 VGT 12 56 ...
10/6/04 SDG 04 14 ...
10/6/04 Rocket 06 56 ...
10/6/04 Diamond 12 56 ...
10/6/04 Multimedia 12 56 ...
10/7/04 VGT 12 56 ...

I can easily do an ascending sort on the date, but the machine type is a
problem. It would almost conform to a reverse alphabetical sort, but not
quite... suggestions?

Aaron
 
R

Rick Brandt

Air-ron said:
I'm setting up a query to export data that conforms to an excel
spreadsheet provided by my boss.

It'll be a crosstab query, with time values as column headings, and
the row headings are Date, and Machine Type. Unfortunately, the
format I need to conform to is this:

Date: MachType: 8:00AM 10:00AM ...
10/6/04 VGT 12 56 ...
10/6/04 SDG 04 14 ...
10/6/04 Rocket 06 56 ...
10/6/04 Diamond 12 56 ...
10/6/04 Multimedia 12 56 ...
10/7/04 VGT 12 56 ...

I can easily do an ascending sort on the date, but the machine type
is a problem. It would almost conform to a reverse alphabetical
sort, but not quite... suggestions?

Aaron

Create an additional table with two fields, the MachType and a SortOrder numeric
field. Include this table in your query and sort on the numeric value.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top