How do I split field of unknown size? (1 Viewer)

Superock

Registered User.
Local time
Today, 01:14
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?
 

Superock

Registered User.
Local time
Today, 01:14
Joined
Nov 3, 2004
Messages
40
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
 

RichO

Registered Yoozer
Local time
Today, 00:14
Joined
Jan 14, 2004
Messages
1,036
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

  • db1.zip
    9.7 KB · Views: 110

Superock

Registered User.
Local time
Today, 01:14
Joined
Nov 3, 2004
Messages
40
Yipee

RichO, you are the man.....

Thanks alot
 

Users who are viewing this thread

Top Bottom