How do I split field of unknown size?

Superock

Registered User.
Local time
Yesterday, 21:40
Joined
Nov 3, 2004
Messages
40
I have a table with a AssetTag field, this has to be split into two fields.

ServiceTag and NewAssetTag

The current format of an old assettag looks something like this:

XX11111111 or XXXX1111 or 11111111 or 11111111XX

Where X=ServiceTag and 1=AssetTag

I would use Left, Right but the lenght of 1 always varies. Any ideas?
 
Could you provide a sample?

Thx for your quick responce Rich, do you think it would be at all possible for you to provide a sample dB that uses your code in a query. I am very much a novice at this and do not know exactly how I would make the references.

Thx
 
The sample db attached has a simple table with one field made up of random letters & numbers. The functions are found under modules and the query displays the original field as well as the field split into 2 sections using the functions.
 

Attachments

Yipee

RichO, you are the man.....

Thanks alot
 

Users who are viewing this thread

Back
Top Bottom