?
Solved

What's wrong with my query?

Posted on 2013-05-28
4
Medium Priority
?
288 Views
Last Modified: 2013-07-03
I've attached a large query. For some reason though it seems to fail importing with this error:
#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'Swiss Roll 300g','2.45'),('Bakery','05/28/2013 13:53:56','Staffords Apple Tart 6' at line 1

I've removed that line and the error continues onto the next line. I can't understand why this is so as the inputs before it don't get flagged as a problem.

It is a large query and Im running it in through phpmyadmin SQL tab. If I reduce down the rows it works fine (tested it at around 300) however, why this error is appearing I do not know.

Thanks in advance.
query.txt
0
Comment
Question by:oconnork00
[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
4 Comments
 
LVL 11

Expert Comment

by:John Easton
ID: 39201267
I'm not a mySQL expert, but it sounds like the number of records you are inserting have exceeded the max query size and therefore mySQL my be truncating your query which would give an error.
0
 
LVL 5

Expert Comment

by:sriramiyer
ID: 39201320
I have changed your query.
Here you try this new file attatched.
pl give feed back for immediate assistance!
from
SriRamIyer
queryNew.txt
0
 
LVL 41

Accepted Solution

by:
ralmada earned 2000 total points
ID: 39201624
The limit of your statement is established by the max_allowed_packet parameter. Try adjusting it and re-run your query. For example you can increase it to 32M like this:

mysqld --max_allowed_packet=32M

http://dev.mysql.com/doc/refman/5.5/en/packet-too-large.html

or you can break your query into multiple ones as suggested above
0
 
LVL 5

Expert Comment

by:sriramiyer
ID: 39215363
>> oconnork00
Are you convinced! post your comments pl
0

Featured Post

Get real performance insights from real users

Key features:
- Total Pages Views and Load times
- Top Pages Viewed and Load Times
- Real Time Site Page Build Performance
- Users’ Browser and Platform Performance
- Geographic User Breakdown
- And more

Question has a verified solution.

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

This post contains step-by-step instructions for setting up alerting in Percona Monitoring and Management (PMM) using Grafana.
In this blog post, we’ll look at how ClickHouse performs in a general analytical workload using the star schema benchmark test.
In this video, Percona Solution Engineer Dimitri Vanoverbeke discusses why you want to use at least three nodes in a database cluster. To discuss how Percona Consulting can help with your design and architecture needs for your database and infras…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

752 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