Select disintct I need to order by on a field not in the select

  • Thread starter Thread starter Cynthia
  • Start date Start date
C

Cynthia

I have a query where I need a distinct list of circuits for a recordset.
I need these in order of the seq number, there are multiple seq numbers per
circuit. My query is as shown below. Since I cannot have the order by with
a distinct call how can I get around this? Any help would be appreciated.

Select distinct circid from eleicterms where tb_name = 'TB-1' and eidwgid =
34 and circid > 0 order by seq1
 
Cynthia said:
I have a query where I need a distinct list of circuits for a recordset.
I need these in order of the seq number, there are multiple seq numbers per
circuit. My query is as shown below. Since I cannot have the order by with
a distinct call how can I get around this?

Select distinct circid from eleicterms where tb_name = 'TB-1' and eidwgid =
34 and circid > 0 order by seq1


Why do you think you can not sort a distinct query? If you
add the field to the query's field list, set it to sort as
desired and un check the Show box, I would expect it to work
the way you want.
 
Back
Top