data manipulation

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Ok, I've thought and thought about this one with no solution.

I have an excel file I need to import daily into my Access program. On the
excel sheet, the "primary key" looks like 00001363149M. I need it to drop
the first three zeros and replace the M with a zero. It should look like
013631490 when it hits my table. Is it better to somehow fix this in excel
before I import or is there a way to do it inside Access (possibly through an
update query).

My project was running smooth until I realized the data did not look the same.
 
It can be done in Access.

Is that string length a constant 12 characters, and it's always an M at the
end?

Mid([ExcelValue], 4, 8) & "0"
 
Yes, it is always 12 characters.

Douglas J. Steele said:
It can be done in Access.

Is that string length a constant 12 characters, and it's always an M at the
end?

Mid([ExcelValue], 4, 8) & "0"

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Chuck Neal said:
Ok, I've thought and thought about this one with no solution.

I have an excel file I need to import daily into my Access program. On
the
excel sheet, the "primary key" looks like 00001363149M. I need it to drop
the first three zeros and replace the M with a zero. It should look like
013631490 when it hits my table. Is it better to somehow fix this in
excel
before I import or is there a way to do it inside Access (possibly through
an
update query).

My project was running smooth until I realized the data did not look the
same.
 
I tried it and it worked great! Thanks!

Douglas J. Steele said:
It can be done in Access.

Is that string length a constant 12 characters, and it's always an M at the
end?

Mid([ExcelValue], 4, 8) & "0"

--
Doug Steele, Microsoft Access MVP

(no private e-mails, please)


Chuck Neal said:
Ok, I've thought and thought about this one with no solution.

I have an excel file I need to import daily into my Access program. On
the
excel sheet, the "primary key" looks like 00001363149M. I need it to drop
the first three zeros and replace the M with a zero. It should look like
013631490 when it hits my table. Is it better to somehow fix this in
excel
before I import or is there a way to do it inside Access (possibly through
an
update query).

My project was running smooth until I realized the data did not look the
same.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top