Hi, I'm looking to take a product code which is currently being entered into one field in the format of A-01-002 with a description as another field and creating 3 new fields with the text between each delimitor having it's own field.
For example the two fields txtProductNumber and txtDescription would become the following 4 fields: txtType (ie the A), txtPart (ie the 01), txtRev (ie the 002) and txt Description.
I just need to do this to update old records (~10000) as all new records will be entered in the new format.
Also, there are some really old records that have a different ProductNumber format but as long as the procedure can ignore them without crashing I can deal with them after.
Any help is appreciated, if this is doable with SQL that would be a major plus but I'm thinking it would have to be VBA. I haven't built a database in nearly a year so I'm pretty rusty.
Thanks!
rw
Small edit: I would prefer if it could detect the "-" deliminators instead of just counting over and seperating, it is possible instead of an "A" in the first field there could be "AES" or similar. Thanks!
For example the two fields txtProductNumber and txtDescription would become the following 4 fields: txtType (ie the A), txtPart (ie the 01), txtRev (ie the 002) and txt Description.
I just need to do this to update old records (~10000) as all new records will be entered in the new format.
Also, there are some really old records that have a different ProductNumber format but as long as the procedure can ignore them without crashing I can deal with them after.
Any help is appreciated, if this is doable with SQL that would be a major plus but I'm thinking it would have to be VBA. I haven't built a database in nearly a year so I'm pretty rusty.
Thanks!
rw
Small edit: I would prefer if it could detect the "-" deliminators instead of just counting over and seperating, it is possible instead of an "A" in the first field there could be "AES" or similar. Thanks!
Last edited: