CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5

Threaded View

  1. #5
    Join Date
    Feb 2008
    Location
    Bangalore
    Posts
    149

    Re: Query the amount of records that repeated in a table

    [QUOTE=sunny_sz]Hi folks:
    Say: A table like below:

    SN Status Datetime
    001 pass 2007/11/05 01:30AM
    002 fail 2007/11/05 01:50AM
    002 pass 2007/11/05 02:00PM
    003 fail 2007/11/05 02:30PM
    003 fail 2007/11/05 03:00PM
    003 fail 2007/11/05 03:15PM
    004 pass 2007/11/05 03:30PM
    .... ..... .........

    select SN,Count(Sn) Cnt From ResultTable Group By Sn Having Count(sn)>1
    Last edited by ComITSolutions; February 25th, 2008 at 01:38 AM.
    Encourage the efforts of fellow members by rating

    Lets not Spoon Feed and create pool of lazy programmers

    - ComIT Solutions

Posting Permissions

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





Click Here to Expand Forum to Full Width

Featured