Link to home
Start Free TrialLog in
Avatar of Steffee
Steffee

asked on

Importing csv files into Access, trouble with triple quotes

Hello, I Hope some one here will be able to help me. I have an access database into which I import csv files. I am coming across problems when a field in the file contains triple quotes.
For example 12456,1,"The Address""","second line" or 12456,1,"The "Address"","second line"
In both of these case the record is seen as unparsable and does not import anything properly.

Is there anything I can do to make Access acept these records without changing the source file?

Thanks in advance

Steph
Avatar of shanesuebsahakarn
shanesuebsahakarn
Flag of United Kingdom of Great Britain and Northern Ireland image

The only way I can see to do this is to import the file with the quotes intact. You can then run a query to remove the quotes from the table:

UPDATE MyTable SET MyField1=Replace(MyField1,Chr(34),""), MyField2=Replace(MyField2,Chr(34),"")...etc...
Avatar of Steffee
Steffee

ASKER

Hello, thank you for your reply, unfortunately I can't get as far as importing the records, as soon as access comes across the triple quotes it just truncates the field and moves to the next record. If I could just import the whole record I would be happy, but I only get half of it...

Thanks

Steph
ASKER CERTIFIED SOLUTION
Avatar of shanesuebsahakarn
shanesuebsahakarn
Flag of United Kingdom of Great Britain and Northern Ireland image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial