simple update query

dott

Registered User.
Local time
Today, 22:48
Joined
Jun 24, 2003
Messages
56
can i make an update query that will change a certain field so that it is a string and then the rest of what the old field was?

so say here's my table

Field1
--------
45
46
47
48

after the update it would look like:

Field1
--------
XXX45
XXX46
XXX47
XXX48

I'm sure this shouldnt be too hard.
 
If you need to keep your field length at 5 digits, use an expression like this in the Update To line:
Right("XXX" & [Field1],5)
 
I wasn't sure if dott's numbers might get larger than two digits and/or if he wanted to keep the field width at 5 characters.

My expression just keeps the width of the data to 5 digits, that's all, but won't work if the table data is less than 2 digits or if it's more than 5. That's why I said in my post "If you need to keep your field length at 5 digits....." ;) Perhaps I was unnecessarily complicated?
 

Users who are viewing this thread

Back
Top Bottom