?
Solved

Problems replacing aphostophies

Posted on 2012-04-13
3
Medium Priority
?
483 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 2000 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

Quick Cloud Training

Looking for some quick training on the cloud in 2 hours or less? Check out these how-to guides in AWS, Linux, OpenStack, Azure, and more!

Question has a verified solution.

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

You need to know the location of the Office templates folder, so that when you create new templates, they are saved to that location, and thus are available for selection when creating new documents.  The steps to find the Templates folder path are …
This article describes a serious pitfall that can happen when deleting shapes using VBA.
This Micro Tutorial will demonstrate in Microsoft Excel how to add style and sexy appeal to horizontal bar charts.
Many functions in Excel can make decisions. The most simple of these is the IF function: it returns a value depending on whether a condition you describe is true or false. Once you get the hang of using the IF function, you will find it easier to us…

762 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