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

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
 
M

Marshall Barton

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.
 

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