Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Count one value based on another value...

Status
Not open for further replies.

caman74

IS-IT--Management
Jan 1, 2005
67
NO
Hello.

I do have, in my db, a single table.
I have the fields:
"ID"
"Productnumber"
"Location"
"In_Stock"
"Total_Locations"

My question is;
I have several productnumbers, both with and without letters/ numbers, but they are not unique.
Each Productnumber is given a location.
Each location is not unique to that productnumber.
But, I might have the same productnumber several times, but with different locations.

I need the field "Total_Locations" to count the number of unique locations, for each Productnumber.

I.E. I have:
PO# "920-580" on both Location "H1" and "291504".
The "Total_Locations" would be 2.

PO# "MayOS" is located only on Location "VM2".
The "Total_Locations" would be 1.

You get my drift? ;)

Regards

Christian
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top