Solved

Problems replacing aphostophies

Posted on 2012-04-13
3
477 Views
Last Modified: 2012-04-13
I was hoping that someone might help me understand why a problem I had importing data occurred and how I can resolve it if it happens in the future.

I was importing data using mySQL workbench and used MS Excel / MS Word to add apostrophes around the text before I imported it.  I then encountered an error when mySQL did not like one of the apostrophes.

(1,'Administrator',6,15,25,‘2012-04-13 00:00:00','1899-12-30 12:18:00','T Administrator')

Only the apostrophe before 2012-04 caused a problem but no matter what I replaced it with in Word, mySQL refused to accept it.  In the end, since I only had 50 records, I changed them all by hand to get the data import to work.

I would appreciate if someone could tell me what causes this behaviour and how to get around it.  Why would only one apostrophe be different – I originally added them all in MS Excel before saving the file in a .csv format, opening it in MS Word.

The steps I took were:
1)      added single quotes around some columns that contained data i.e. =”’” & C4 & “’”
2)      Copied column and pasted Values only
3)      Copied all columns into table in MS Word
4)      Converted table to text using commas as field break
5)      Replaced all paragraphs with ),( adding an initial opening bracket
6)      Copied into MySQL and made it into an Insert query
0
Comment
Question by:Nemetona
  • 2
3 Comments
 
LVL 76

Expert Comment

by:GrahamSkan
ID: 37843048
It looks like a "Smart quote" to me. This one is for opening speech. The closing version looks the same, but turned through 180 degrees.  Some software will treat it like an apostrophe, and some won't.
0
 
LVL 76

Accepted Solution

by:
GrahamSkan earned 500 total points
ID: 37843081
"Smart quotes" is Word's term to differentiate them from straight quotes. The default setting in Word's Autocorrect  is to substitute these angled versions whenever the user hits the single quote (apostrophe) or the double quotes keys.
"'
0
 

Author Closing Comment

by:Nemetona
ID: 37843214
I'm still not very sure why it only happened with the quote before the 2012 and none of the other ones.

By turning off the Autocorrect option to replace straight quotes with curly quotes the issue has gone away.

Many thanks.
0

Featured Post

Master Your Team's Linux and Cloud Stack!

The average business loses $13.5M per year to ineffective training (per 1,000 employees). Keep ahead of the competition and combine in-person quality with online cost and flexibility by training with Linux Academy.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A little background as to how I came to I design this code: Around 5 years ago I designed an add-in that formatted Excel files to a corporate standard, applying different cell colours and font type depending on whether the cells contained inputs,…
Composite queries are used to retrieve the results from joining multiple queries after applying any filters. UNION, INTERSECT, MINUS, and UNION ALL are some of the operators used to get certain desired results.​
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
This Micro Tutorial well show you how to find and replace special characters in Microsoft Word. This is similar to carriage returns to convert columns of values from Microsoft Excel into comma separated lists.

776 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question