|
-
Mar 13th, 2001, 10:39 AM
#1
Thread Starter
Hyperactive Member
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
-
Mar 13th, 2001, 10:48 AM
#2
Select * from table where partnumber='whatever'
.recordcount will tell you how many
rs("partnumber") will tell you the partnumber
-
Mar 13th, 2001, 10:52 AM
#3
Thread Starter
Hyperactive Member
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
-
Mar 13th, 2001, 03:12 PM
#4
Lively Member
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
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|