• Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
  • Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

SQL brain dead ?

Collapse
X
  •  
  • Filter
  • Time
  • Show
Clear All
new posts

    #21
    Originally posted by Fishface View Post
    table
    cols
    id_num group num
    902 738
    456 738
    012 738
    921 602
    223 602
    114 559
    948 559
    335 559

    want to pick ONE row in EACH group_num (there are 250 groups)

    so only 902, 921, 114

    in one query

    how? sorry gone brain -
    select 902, 921, 114

    HTH

    Comment


      #22
      Originally posted by DimPrawn View Post
      select 902, 921, 114

      HTH

      Comment


        #23
        Originally posted by DimPrawn View Post
        select 902, 921, 114

        HTH

        at least get it right

        select * where id_num in (902, 921, 114)

        Comment

        Working...
        X