importing from txt file - leading spaces problem

S

Support

Hi, I have been given some call data from my telecomms provider in csv
format.
I have tried importing that into excel so I can then import into an access
table but the format got emssed up so I have converted the raw data file to
txt.
Problem I have is that if I then import this into excel, I have leading
zeros in my CalledNo field and cannot run my queries.
I have tried importing directly into access but I still have the problems of
leading zeros.
Is there an access function that will remove these or is it more an excel
problem?
Or can I just add the leading zero into my query? I have tried using
running my standard query but it pops up asking for a prameter value.
Thanks
 
S

Steve Schapel

Support,

First point is that there is no need to implicate Excel into this at
all. There is no problem with importing directly to Access from a .csv
file.

As for the leading zeroes, which I gather is causing the imported data
to mis-match with your existing data, you could try using the Val()
function. For example, Val([CalledNo]) will return 123 if CalledNo is
"000123". Alternatively, you could try the Format function to make your
existing data match the imported. For example,
Format([CalledNo],"000000") will return "000123" if CalledNo is "123".

If you need more specific help with this, please post back with more
details, with examples, regarding what you are trying to do, and the
problems you are encountering.
 

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

Top