Cut off first few characters in field in table

I have a text field in my table:

123456789 / Last Name First Name

Before importing from Excel, I simply have Excel delete the first 12 characters, then I import it into the database. How do I tell the table in Access to cut off these characters when they're imported so I don't have to do it in Excel first?

Thanks!
Kevin
Kevin SmithAsked:
Who is Participating?
 
rockiroadsCommented:
mid$([namefield],13)

in your query, get your name to be selected like this, this then removes first 12 characters

select field1, field2, mid$([namefield],13) as cutname
from table
0
 
rockiroadsCommented:
actually what might be better (since I re-read your question)

is to use import export specifications and set it that way

or just run an update command afterwards

update table
set namefld = mid$(namefld,13)



0
 
Kevin SmithAuthor Commented:
How would I do the import/export specs?
0
Cloud Class® Course: Ruby Fundamentals

This course will introduce you to Ruby, as well as teach you about classes, methods, variables, data structures, loops, enumerable methods, and finishing touches.

 
Kevin SmithAuthor Commented:
The import export specs works only for importing another db, correct?  I'll be importing from excel.
0
 
Kevin SmithAuthor Commented:
Okay, I got it, but it seems to be cutting it from the wrong direction (counting back from last letter)...how do I start the cut at the first letter (left)?
0
 
Kevin SmithAuthor Commented:
Nevermind...I got it :)

Expr1: Mid([Payee ID/Name],13)

Thanks!
Kevin
0
 
GRayLCommented:
Are you trying to clean up the field using the import spec?  I think you would be better off importing all the data and then running an update query like rockiroads suggested. Confirm you are using a European or NA installation and not a read right to left?
0
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.