By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,293 Members | 1,382 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,293 IT Pros & Developers. It's quick & easy.

numbering by unique

P: n/a
Hello.
I have table that has this type of data except for column "location"

location ID Cnum Company Address
1 1 10123 ABC Inc. California
1 2 10124 Big Company Nevada
1 3 10125 Company C Minnesota
2 4 10125 Company C New York
3 5 10125 Company C Georgia
1 6 10126 Distant Company London

ID is autonumber field and primary key.
I need to figure out a way to create the location column entries on existing
data and for every new record added.
The location is a number so that each location for the companies has a unique
id number.
i.e. when there is only one location, it's location number is 1...when there
is more than one location for a company, the location is a number starting at
1 and incrementing for each location for that company.

There are 12000 records in this table and about 9000 unique companies...so I
don't want to create a table for each company.
Any ideas how I can do this? Thanks
May 8 '06 #1
Share this question for a faster answer!
Share on Google+

This discussion thread is closed

Replies have been disabled for this discussion.