complex sorting query

  • Thread starter Thread starter ram8595
  • Start date Start date
R

ram8595

ost ocity dst dcity carrier price rank
a b c d opq 33 1
a b c d lmn 44 2
o r c d jjj 77 1
c d l p abc 222 1
c d l p irt 245 2
c d t s ddd 12 1

i have a table where is no sorting. now i want to sort the data in the
above form. First i need to get the rows sorted with the
dst ,dcity,ost , ocity and rank. Then the same set of dest st and dest
city could be present as ost and ocity. i want those rows to appear
next. This should be sorted as ost, ocity, dest st, dest city and
rank.

For example c(dest st) and d(dest city) come in the first three rows
and then c and d are in ost and ocity. so the fourth , fifht and sixt
rows are sorted by ost, ocity , dest st , destn city and rank. So
there are two different sorting rules here. is there any way to
accomplish this in a single sql query or design grid in access\

pls help thanks
 
Create a select query and in design view drag the fields to appear in dst,
dcity, ost, ocity, rank, carrier, and price order left to right.
In the Sort row of the grid select Ascinding for dst, dcity, ost, ocity, and
rank and leave carrier and price sort blank.
 
Create a select query and in design view drag the fields to appear in dst,
dcity, ost, ocity, rank, carrier, and price order left to right.
In the Sort row of the grid select Ascinding for dst, dcity, ost, ocity, and
rank and leave carrier and price sort blank.
--
KARL DEWEY
Build a little - Test a little








- Show quoted text -

it is not as easy .i mean first it has to get sorted by dst, dcity and
then by ost, ocity because some dst and dcity become ost and ocity and
i need those to come as next rows. pls look at the pattern of data
above

pls help
 
Back
Top