Sorting a Query

T

theseandavis

Hey there,

Im trying to sort some data here beyond just ascending or descending.
Basically, I have a list of data in three columns. Let's call them A,
B, and C. Column A has 23 different types of data and must be grouped
together (ie, the 1st of 23 within A is together then the 2nd of A,
etc). Column B has 3 different types - Forecast, Plan, and Actual.
Column C has up to 277 different types.

What I need is:
A1..B1..C1
A1..B2..C1
A1..B3..C1
A1..B1..C2
A1..B2..C2
A1..B3..C2

...again, where B is forecast, plan, and actual. Essentially All of the
A's grouped, then C's, and then B1, 2, and 3.

Any help?
 
T

theseandavis

Thank you! That's worked for the most part. Through this response I
have now learned SQL with the help of a big fat book of course...

Is there any way to overcome what happens when there are two entries of
the same kind?

eg.
A1..B1..C1
A1..B2..C1
A1..B3..C1
A1..B1..C2
A1..B1..C2
A1..B2..C2
A1..B2..C2
A1..B3..C2
A1..B3..C2

.... in this instance there are two items listed for C2 with the same
name (so, two groups of 3), and rather than display 'Forecast Plan
Actual Forecast Plan Actual', it instead displays 'Forecast Forecast
Plan Plan Actual Actual'.
 

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