Tycoon Talk
Become a Big fish!
The number 1 forum for online business!
Post topics, ask questions, share your knowledge.
Tycoon Talk is part of Freelancer.com - find skilled workers online at a fraction of the cost.

PHP Forum


You are currently viewing our PHP Forum as a guest. Please register to participate.
Login



Freelance Jobs

Reply
Load data in MySQL terminates with quotation marks
Old 06-26-2005, 03:42 AM Load data in MySQL terminates with quotation marks
Novice Talker

Posts: 8
Trades: 0
I am trying to load fields with quite large data into a MySQL database. Some of the data in the fields has single quotation marks. I need to retain those quotation marks, but when I load the data with 'load data ....' the field terminates when it meets the first quotation mark. The actual field teminator is not affected, the next field starts at the right position. What it does is truncate the data in the field and refuse to go past the quotation mark. If I load the data with 'insert...' it works fine and retains the quotation marks. However I have several thousand rows to load and insert would be far too long winded. Why does 'load data ' fail like this and is there anything I can do about it? Also is there anyway to see what the warnings mean? The documentation seems to suggest there isn't, but that seems just plain silly.

Bob
bobfarq is offline
Reply With Quote
View Public Profile
 
 
Register now for full access!
Old 06-26-2005, 06:20 AM
celticbrue's Avatar
Extreme Talker

Posts: 175
Location: Wiltshire, England
Trades: 0
It sounds very much like you need to re-assess you LOAD DATA query to include some extra instructions like FIELDS ESCAPED BY etc, without seeing it, it is hard to properly assess what the problem is

This link might help

Regards

Ian
__________________
Found this useful? - HIT MY TALKUPATION!


Please login or register to view this content. Registration is FREE
celticbrue is offline
Reply With Quote
View Public Profile
 
Old 06-26-2005, 08:53 AM
Novice Talker

Posts: 8
Trades: 0
Thanks. It put me on the right track. I couldn't make any difference with the enclosed by or escaped by clauses but it was clear it was using quotation marks as special characters, so I globally escaped them in my loadfile and they all load in properly now. Wish I could see what the warnings meant it would make these things easier. Oracle writes the warnings to an error file in its load function, don't know why mysql can't do the same.

Bob
bobfarq is offline
Reply With Quote
View Public Profile
 
Reply     « Reply to Load data in MySQL terminates with quotation marks
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are Off
Refbacks are Off





   
RSS Feed  Feeds: RSS   JS   XML
RSS Feed  Feeds for this forum: RSS   JS   XML



Page generated in 0.61117 seconds with 12 queries