If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Access > Question about using " and ' in a field.

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 01-31-12, 15:19
RBusiness RBusiness is offline
Registered User
 
Join Date: Aug 2010
Posts: 87
Question about using " and ' in a field.

Hello,

Quick question about using " and ' within a field. I have a list of keywords, some of which have quotes, symbols for inches i.e. " and symbols for feet i.e. '.

I would like to leave them in there. So the question is, can I leave them in there and successfully export my Access dB to a CSV so that it can later be imported in a MySQL dB?

I guess my concern is that if there is a quote, inch or foot character, that it will cause conflicts upon export and or import.
Reply With Quote
  #2 (permalink)  
Old 01-31-12, 16:22
healdem healdem is online now
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,250
this will bit you in the backside.
as a general rule use ' to delimit strings
eg
myvariable = 'this is an example'
although with Access you can use " as well
theoretically you can use "" to use the " symbol inside text. but it can get messy very quickly, especially if you are intending pumping data into another database. I'd strongly recommend you use ft in in place of ' " eg 6ft4in, or leap forward into the 19th century and use the metric system for measurements eg 1.88m . the problem is not storing the data in Access, or in MySQL its pushing it from Access to MySQL. you can get round it by telling Access to export the file using another symbol to delimit strings and tell MySQL to use the same symbol to import strings. its a mess
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
  #3 (permalink)  
Old 01-31-12, 16:33
RBusiness RBusiness is offline
Registered User
 
Join Date: Aug 2010
Posts: 87
fair enough

but does using " and ' within things like a product description get nasty too? I mean, can I use it anywhere? (this dB is about to have no " or ' in it anywhere! LOL) TABLEWIDE deletion is coming! Expect a post for it. lol



Why didn't someone come up with a delimiter such as open and close brackets for data moving. Like <!openfield> </closefield!> for open and close field. That way there's no doubt that it's the container!
Reply With Quote
  #4 (permalink)  
Old 02-01-12, 04:55
healdem healdem is online now
Jaded Developer
 
Join Date: Nov 2004
Location: out on a limb
Posts: 9,250
there is, however not all databases use the same symbol
google escape characters

you shoul be abel to get away with \" or \' as an escape symbol for inserting into MySQL
__________________
I'd rather be riding my Versys or my Tiger 800 let alone the Norton
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On