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 Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Group and create an ID

Status
Not open for further replies.

air1access

Technical User
Joined
Jan 27, 2008
Messages
123
Location
US
I have a table that I need to create an "ID" for matching values in one field...
Right now the tbl looks like this:
Fld1
1234
1234
1234
18
18
22
22
22

I need for it to look like this: (with a new fld - creating an ID)
Fld1 NewFld
1234 0001
1234 0001
1234 0001
18 0002
18 0002
22 0003
22 0003
22 0003

I'm trying to create an "ID" for the each group - NOT - each record....
Any suggestions or examples..??
Thank you in advance..!!!
air1access
 
>>Any suggestions or examples

Yes. My suggestion is not to do that.

My suggestion is to put the group ID in another table:

1234 0001
18 0002
22 0003
456 0004
7892 0005
45 0006

That way you can get to it by a join. Putting it on each record breaks normalization I think ( I defer to the normalization gurus on that, however).
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top