Results 1 to 4 of 4

Thread: ok, let's see if i can explain this

  1. #1

    Thread Starter
    Hyperactive Member PJB's Avatar
    Join Date
    Aug 2000
    Location
    dunno at the moment
    Posts
    302
    what i need to do is select a part number from a database, and there may be more than one occurence of the part no., i have to count how many occurences and display the number of occurences and also display the part no. but i can't show duplicates, any clues?
    VB6.0 SP4
    Windows 2000
    I'm thinking of a number between

  2. #2
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    Select * from table where partnumber='whatever'

    .recordcount will tell you how many

    rs("partnumber") will tell you the partnumber
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  3. #3

    Thread Starter
    Hyperactive Member PJB's Avatar
    Join Date
    Aug 2000
    Location
    dunno at the moment
    Posts
    302
    but will that just return the unique number, there could be a few duplicates and i want to count them just not display them, and i have to return all the records, ummm

    like this:
    Part number 1 happens 4 times
    Part number 2 happens 2 times
    Part number 3 happens 3 times

    sorta like that
    VB6.0 SP4
    Windows 2000
    I'm thinking of a number between

  4. #4
    Lively Member
    Join Date
    Jan 2000
    Posts
    65

    try this..

    select [partNo], count(*) from issuetable group by [partNo]

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