473,786 Members | 2,705 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

MYSQL Limit on length of insert statements?

My tired old eyes may be failing me, but the following insert
statements look correct to me, but I can't seem to get a clean insert
from a fairly large text file database into mysql. I was wondering if
maybe I'm hitting a limit on character length per line on some insert
statements that I'm trying.

Here's the error messages:

execute failed: 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
'"COMP",5,"CRAW LSP","","PUBLIC ","","LAP,STONE ","","FIREPL,GR EAT- at
../res_sort.pl line 24, <line 1.

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 '"COMP",8,"CRAW LSP","ACREADY", "PUBLIC","EATAR EA","WOODCOM"," ","G
at ./res_sort.pl line 24, <line 2.

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 '"COMP",3,"CRAW LSP","ACREADY", "PUBLIC","FORMA L","WOODCOM","" ,"GR
at ./res_sort.pl line 24, <line 3.

execute failed: 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
'"COMP",3,"CRAW LSP","ACREADY", "PUBLIC","FORMA L","WOODCOM","" ,"GR at
../res_sort.pl line 24, <line 4.

Here's a sample of the insert statements (note: this is all on one
line -- though it may not appear that way because google news
automatically chops lines of greater than a certain length)

INSERT INTO
residential(ml, Area,ListPrice, City,County,Nei ghborhood,ZipCo de,PropertyType ,LotDescription ,LotDimensions, LotSize,Exterio rFeatures,Numbe rofLevels,Inter iorFeatures,Kit chenFeatures,Fi replaceDescript ion,ElementaryS chool,MiddleSch ool,HighSchool, Heat,YearBuilt, Style,NumberofB edrooms,Numbero fCarGarage,Gara geDescription,N umberofFireplac es,TotalSQFT,Nu mberofFullBathr ooms,NumberofPa rtialBathrooms, TotalBathrooms, PublicRemarks,L istingAgentPubl icID,ListingOff iceID,ListingOf ficePhone,Listi ngAgentName,Lis tingAgentPhone, ListingOfficeNa me,Acres,Roof,N umberofPhotos,B asementFoundati on,Cooling,Wate r,DiningRoom,Ex teriorDescripti on,FamilyRoom,L ivingRoom,Acces sibility,Virtua l,Waterfront,Wa terfrontDescrip tion)
VALUES(6003771, "44",371100,"Va ncouver","Clark ","Skylar
Estates",98686, "RESID","LEVEL" ,"","5K-6,999SF","PATIO ,SPRNKLR",2,"GA R-OPN,HARDWOD,TIL E-FL,LAM-FL,SOAKTUB","BI-MICO,DISHWAS,DI SPOSL,GASAPPL,P ANTRY,FS-RANG","GAS","PL EASANT
VALLEY","PLEASA NT
VALLEY","PRAIRI E","FOR-AIR",2006,"CRAF TSM",5,2,"ATTAC HD",1,2533,3,1, 3.1,"Elegance
marks this home w/atrium & mother-in-law suite/office w/separate
entry.Beautiful great rm concept complete w/feplce & bamboo
hardwds.Gourmet islnd kitchn w/granite cntrtp,stlestee l appl, eating
area & formal dining. 4bedrms 3 1/2 bth.Photos/virtual tour 4 flr plan
idea only!","BREDLIE S","4PLA01","36 0-896-5086","Shastine
Bredlie","360-904-9907","Platinum Real
Estate",,"COMP" ,3,"CRAWLSP","A CREADY","PUBLIC ","FORMAL","WOO DCOM","","GREAT-R","","http://www.obeo.com/u.aspx?id=25211 9","","");
Here's the record layout:

Field Type Null Key Default Extra
id int(11) PRI NULL auto_increment
ml int(11) YES NULL
Area varchar(35) YES NULL
ListPrice float(8,2) YES NULL
City varchar(30) YES NULL
County varchar(20) YES NULL
Neighborhood varchar(20) YES NULL
ZipCode int(5) YES NULL
PropertyType varchar(40) YES NULL
LotDescription varchar(18) YES NULL
LotDimensions varchar(20) YES NULL
LotSize varchar(15) YES NULL
ExteriorFeature s varchar(100) YES NULL
NumberofLevels int(1) YES NULL
InteriorFeature s varchar(100) YES NULL
KitchenFeatures varchar(100) YES NULL
FireplaceDescri ption varchar(10) YES NULL
ElementarySchoo l varchar(20) YES NULL
MiddleSchool varchar(20) YES NULL
HighSchool varchar(20) YES NULL
Heat varchar(20) YES NULL
YearBuilt int(4) YES NULL
Style varchar(10) YES NULL
NumberofBedroom s int(2) YES NULL
NumberofCarGara ge int(1) YES NULL
GarageDescripti on varchar(10) YES NULL
NumberofFirepla ces int(1) YES NULL
TotalSQFT int(5) YES NULL
NumberofFullBat hrooms int(1) YES NULL
NumberofPartial Bathrooms int(1) YES NULL
TotalBathrooms float(2,1) YES NULL
PublicRemarks text YES NULL
ListingAgentPub licID varchar(10) YES NULL
ListingOfficeID varchar(10) YES NULL
ListingOfficePh one varchar(13) YES NULL
ListingAgentNam e varchar(25) YES NULL
ListingAgentPho ne varchar(13) YES NULL
ListingOfficeNa me varchar(25) YES NULL
Acres float(4,2) YES NULL
Roof varchar(20) YES NULL
NumberofPhotos int(1) YES NULL
BasementFoundat ion varchar(20) YES NULL
Cooling varchar(20) YES NULL
Water varchar(10) YES NULL
Sewer varchar(10) YES NULL
DiningRoom varchar(50) YES NULL
ExteriorDescrip tion varchar(100) YES NULL
FamilyRoom varchar(50) YES NULL
LivingRoom varchar(50) YES NULL
Accessibility varchar(10) YES NULL
VirtualTour varchar(50) YES NULL
Waterfront varchar(10) YES NULL
WaterfrontDescr iption varchar(20) YES NULL

Anyone have any suggestions?

Jul 17 '06 #1
2 8259
>My tired old eyes may be failing me, but the following insert
>statements look correct to me, but I can't seem to get a clean insert
from a fairly large text file database into mysql. I was wondering if
maybe I'm hitting a limit on character length per line on some insert
statements that I'm trying.
I see a double comma outside of quotes appearing just before the
string listed in the error message. This is a syntax error.
>execute failed: 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
'"COMP",5,"CRA WLSP","","PUBLI C","","LAP,STON E","","FIREPL,G REAT- at
./res_sort.pl line 24, <line 1.
Gordon L. Burditt
Jul 18 '06 #2

you should check the place with lines below...
Bredlie","360-904-9907","Platinum Real
Estate",,"COMP" ,3,"CRAWLSP","A CREADY","PUBLIC ","FORMAL","WOO DCOM","","GREAT-R","","http://www.obeo.com/u.aspx?id=25211 9","","");
~~

Jul 18 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
3496
by: duikboot | last post by:
Hi all, I'm trying to export a view tables from a Oracle database to a Mysql database. I create insert statements (they look alright), but it all goes wrong when I try to execute them in Mysql, because the dates must have quotes on each side. I just don't know how make the dates right. Well I'll just show you the code and some insert statements it generates. Could anyone please help me?
0
3530
by: Lenz Grimmer | last post by:
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Hi, MySQL 4.0.14, a new version of the popular Open Source/Free Software Database, has been released. It is now available in source and binary form for a number of platforms from our download pages at http://www.mysql.com/downloads/ and mirror sites.
0
3948
by: Mike Chirico | last post by:
Interesting Things to Know about MySQL Mike Chirico (mchirico@users.sourceforge.net) Copyright (GPU Free Documentation License) 2004 Last Updated: Mon Jun 7 10:37:28 EDT 2004 The latest version of this document can be found at: http://prdownloads.sourceforge.net/souptonuts/README_mysql.txt?download
1
3380
by: jlee | last post by:
I'm pretty much a newbie on mysql, and I need some help. I am running mysql Ver 12.22 Distrib 4.0.24, for portbld-freebsd5.4 (i386) on a server hosting an active website. The site's developer uses his own php shopping cart to receive customer orders. The configuration was done via cPanel with no external modifications - which produced no protests when built, ran and connected with no
7
10161
by: greywire | last post by:
So I need to load lots of data into my database. So I discover LOAD DATA INFILE. Great! This little gem loads my CSV in blazing times (compared to parsing the file and doing INSERT for each row). Its still slow on large files, but just barely acceptable. Only one problem. It truncates fields to 256 characters, even on a text field.
1
15392
by: Ike | last post by:
Recently, I began using a different MySQL verver (i.e. different machine as well as different version#, going from 4.12a to 4.1.9 max). The following query used to work: select firstname, lastname, from associates where username like 'nancianne' but now fails with: "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 'from associates
2
2671
by: newbie | last post by:
Dear folks, pardon me if this is a stupid question. For this table --------------------------------------- | id | foo | bar | -------------------------------------- I understand that we can insert a row to the table per call, like this sql_query = "INSERT INTO `table` (`foo`, `bar`) VALUES ('$string_1',
6
38523
Atli
by: Atli | last post by:
This is an easy to digest 12 step guide on basics of using MySQL. It's a great refresher for those who need it and it work's great for first time MySQL users. Anyone should be able to get through this without much trouble. Programming knowledge is not required. Index What is SQL? Why MySQL? Installing MySQL. Using the MySQL command line interface
1
9586
ssnaik84
by: ssnaik84 | last post by:
Hi Guys, Last year I got a chance to work with R&D team, which was working on DB scripts conversion.. Though there is migration tool available, it converts only tables and constraints.. Rest of things (stored procedures, functions).. we have to manually edit. That time, we face some interesting challenges.. I failed to document all of them, but whatever I can share with u.. I will try.. :) ...
0
9647
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9496
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10363
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10164
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10110
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7512
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
6745
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5534
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
3
2894
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.