c - MS Access: Search through Table for the same part of the String -
c - MS Access: Search through Table for the same part of the String -
i trying loop through column values within table. have register form, provides user unique id, based uppon information. example: country = austria each user selects country republic of austria sort of unique value match (lets 00).
account id this:
xxxx00uniquecode
each country has it´s own unique value: (at = 00, de = 01, etc
)
now, want generate unique code each user, increment (+1) value of previous uc value stored in table, for same country!
in order that, need somehow loop through column, business relationship ids stored , search match. thing is, when user tries generate unique code, not have yet, has only:
xxxx00
now need find xxxx00 strings in accountid column, , store them in array - find max value of , increment it.
but dont know how search part of string within column of table ? xxxx00
part, not entire business relationship id xxxx00uniquecode
.
agh, hope can understand me. it´s quite complicated know, i´m stuck here. hopefully, know mean , maybe find smoother solutions this.
thanks in advance!
you're pounding square peg round hole. why not create new column called userid , can do:
select max(userid) mytable mid(accountid, 5, 2) = "00"
and increment 1.
better yet, store countrycode, userid , xxxx part in separate fields, , index them. it'll save time when search or filter, i'm assume you're going doing.
c vba ms-access access-vba
Comments
Post a Comment