Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Query to change numbers to 3 character places (2 would become 002)

Status
Not open for further replies.

zak88lx

Technical User
Sep 9, 2004
1
Hello,

I have a .csv file which contains 805,000+ rows of attribute information. I need to import this .csv file into an Access table.
I need to change one of the fields in the .csv before importing or after importing..
The field that needs to be changed contains a letter (L) and then a number after that letter. The number range can be anywhere between 1-300.
The problem I have is that the numbers after the L are truncated to only show what is required. So if the number after L was 2 it would only show L2 but I need it to contain 3 number characters so number after L would show as L002.
Can I perform a query on this field to update all L records to 3 characters L002?
If this is possible can someone help me with the query?

Thanks,
Zak
 
after importing you could run an update statement. Something like.

UPDATE tblTest SET thenewfield = theL &
Format(cstr(theNum),"000")
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top