Thursday 15 August 2013

sql - Group similar records by same ID in access -



sql - Group similar records by same ID in access -

i have table total of clients in access , similar each other (eg. nbc6, nbc10, etc.) wondering if there way grouping similar clients , assign them 1 id. start off same thinking search them i'm unsure how go in vba. rather new access , sql help appreciated!

create new field in table called clientgroup. set datatype text.

get list of clientgroup names want use. let's say, example, nbc6 , nbc10 should end in 1 grouping called nbc.

run update query assign group:

update tblclients set clientgroup = "nbc" clientname "nbc*"

the asterisk sign acts wildcard, update records first 3 letters of clientname "nbc".

it's lot of manual work, suppose if know want utilize first 3 characters of clientname can write loop set them in array, that's not case.

sql vba ms-access access-vba

No comments:

Post a Comment