Results 1 to 3 of 3

Thread: Need Help 2

  1. #1
    Join Date
    Nov 2003
    Posts
    21

    Unanswered: Need Help 2

    I am currently converting an access DB to MS SQL.

    I am currently trying to figure out how to code this

    I need the count of all rows in colum TERM that is > 1 when its grouped by the COLUM NAME

    Anyone got any Ideas,

  2. #2
    Join Date
    Nov 2003
    Location
    Malaysia
    Posts
    9
    i'm not sure wheter i get it right.

    hope that it was the thing that you ask for.

    Select TERM,Count(<table key>) as Cnt from <Table \name>
    Wher TERM > 1
    Group by TERM.

    If I didn't get it right then just forget about it.

  3. #3
    Join Date
    Oct 2001
    Location
    England
    Posts
    426
    select count(*) from tbl
    where term in
    (
    select term from tbl group by name having count(*) > 1
    )

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •