MrBrick
MrBrick

Reputation: 23

How do I remove the first 8 characters from a Microsoft Access database field?

I've got an Access '07 database that imports data from text files. The problem is one of the fields that is taken in comes with a date value before a place value that I don't need. For example, the field comes in like so: 01012010DUBLIN whereas I need it to just display DUBLIN.

I'm stumped on this and any help would be greatly appreciated

Thanks.

Upvotes: 0

Views: 7878

Answers (1)

Daniel Szabo
Daniel Szabo

Reputation: 7281

I don't know what your skill level is, but the easiest approach would be to import the data to a temporary table, and then do a make-table query. On the make-table query, bring that column in using mid() function:

mid([your field name], 9, [max number of chars to span])

This will truncate the text starting at the 9th character in your field.

Note - You could skip the temp table part and just run an update query on your imported data using the same mid() function.

Upvotes: 2

Related Questions