Sql server Query, having count(*)>1 and order by count(*) desc

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • fran7
    New Member
    • Jul 2006
    • 229

    #1

    Sql server Query, having count(*)>1 and order by count(*) desc

    Hi, I have this query to get a drop down list and that works fine. The trouble is I need to select another field from the table to give it a where clause but if I try I get an error message.

    Code:
    SQLQuery = "select tbl.country from tbl group by country HAVING COUNT(country) > 1 order by count(country) desc"
    Any pointers would be great
    Thanks
    Richard
  • Rabbit
    Recognized Expert MVP
    • Jan 2007
    • 12517

    #2
    I don't see a where clause or the error message.

    Comment

    Working...