| | |
Help building database
Please support our MySQL advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
Thread Solved |
•
•
Join Date: Jan 2008
Posts: 18
Reputation:
Solved Threads: 0
I am relatively new to mysql. I am updating a site for a customer, and I'm using mysql 5 w/ phpMyAdmin. I was supplied an .sql (echeck.sql) script to build the database for this site. I create a database named "echeck" in phpMyAdmin, and once created go to the import tab of phpMyAdmin to import the .sql script...when i click the "go" button i recieve this:
Error
SQL query:
--
-- Dumping data for table `tbl_tax`
--
INSERT INTO `tbl_tax` ( `taxid` , `taxdesc1` , `taxper1` , `taxst1` , `taxdesc2` , `taxper2` , `taxst2` , `taxdesc3` , `taxper3` , `taxst3` , `taxdesc4` , `taxamt1` , `taxst4` , `taxdesc5` , `taxamt2` , `taxst5` , `tax_prt_id` )
VALUES ( 1, 'tax1', 0.00, '1', '', 0.00, '', 'tax2', 0.00, '', 'tax4', 0.00, '1', '', 0.00, '', 26 ) , ( 2, 'taxa', 2.00, '1', 'taxb', 2.00, '1', 'taxc', 2.00, '1', 'taxd', 23.00, '1', 'taxE', 2.00, '1', 52 ) ;
MySQL said: Documentation
#1265 - Data truncated for column 'taxst2' at row 1
The script apparently kicks out and not all the tables are created. Does anyone know the cause of this? should i not be using import to run the script? if so how do i run it then?
Error
SQL query:
--
-- Dumping data for table `tbl_tax`
--
INSERT INTO `tbl_tax` ( `taxid` , `taxdesc1` , `taxper1` , `taxst1` , `taxdesc2` , `taxper2` , `taxst2` , `taxdesc3` , `taxper3` , `taxst3` , `taxdesc4` , `taxamt1` , `taxst4` , `taxdesc5` , `taxamt2` , `taxst5` , `tax_prt_id` )
VALUES ( 1, 'tax1', 0.00, '1', '', 0.00, '', 'tax2', 0.00, '', 'tax4', 0.00, '1', '', 0.00, '', 26 ) , ( 2, 'taxa', 2.00, '1', 'taxb', 2.00, '1', 'taxc', 2.00, '1', 'taxd', 23.00, '1', 'taxE', 2.00, '1', 52 ) ;
MySQL said: Documentation
#1265 - Data truncated for column 'taxst2' at row 1
The script apparently kicks out and not all the tables are created. Does anyone know the cause of this? should i not be using import to run the script? if so how do i run it then?
•
•
Join Date: Dec 2007
Posts: 195
Reputation:
Solved Threads: 27
The command will be
MySQL Syntax (Toggle Plain Text)
mysql databasename < echeck.sql -uMYSQL-USERNAME -p
•
•
Join Date: Jan 2008
Posts: 18
Reputation:
Solved Threads: 0
ok, so here is what i type:
mysql echeck < c:/Program Files/Apache Software Foundation/Apache2.2/htdocs/admin/echeck.sql -uMYSQL-ROOT -p
where "root" is a valid user in my mysql. I recieve the error:
ERROR 1064 (42000): 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 'mysql echeck < c:/Program Files/Apache Software Foundation/Apache2.2/htdocs/admin' at line 1
What am i doing wrong?
mysql echeck < c:/Program Files/Apache Software Foundation/Apache2.2/htdocs/admin/echeck.sql -uMYSQL-ROOT -p
where "root" is a valid user in my mysql. I recieve the error:
ERROR 1064 (42000): 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 'mysql echeck < c:/Program Files/Apache Software Foundation/Apache2.2/htdocs/admin' at line 1
What am i doing wrong?
•
•
Join Date: Sep 2007
Posts: 176
Reputation:
Solved Threads: 20
•
•
•
•
ok, so here is what i type:
mysql echeck < c:/Program Files/Apache Software Foundation/Apache2.2/htdocs/admin/echeck.sql -uMYSQL-ROOT -p
where "root" is a valid user in my mysql. I recieve the error:
ERROR 1064 (42000): 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 'mysql echeck < c:/Program Files/Apache Software Foundation/Apache2.2/htdocs/admin' at line 1
What am i doing wrong?
Amer Neely - Web Mechanic
"Others make web sites. We make web sites work!"
"Others make web sites. We make web sites work!"
•
•
Join Date: Jan 2008
Posts: 18
Reputation:
Solved Threads: 0
ok so i got the syntax correct and it started to run the .sql but i am still getting this error:
ERROR 1265 (01000) at line 894 in file: 'c:\echeck.sql' : Data truncated for column 'taxst2' at row 1
In the echeck.sql, under the create table directive, taxst2 is defined as:
`taxst2` enum('0','1') NOT NULL default '0',
and line 894 in the file is as follows
INSERT INTO `tbl_tax` (`taxid`, `taxdesc1`, `taxper1`, `taxst1`, `taxdesc2`, `taxper2`, `taxst2`, `taxdesc3`, `taxper3`, `taxst3`, `taxdesc4`, `taxamt1`, `taxst4`, `taxdesc5`, `taxamt2`, `taxst5`, `tax_prt_id`) VALUES
(1, 'tax1', 0.00, '1', '', 0.00, '', 'tax2', 0.00, '', 'tax4', 0.00, '1', '', 0.00, '', 26),
(2, 'taxa', 2.00, '1', 'taxb', 2.00, '1', 'taxc', 2.00, '1', 'taxd', 23.00, '1', 'taxE', 2.00, '1', 52);
Where is the problem? How do I correct it?
ERROR 1265 (01000) at line 894 in file: 'c:\echeck.sql' : Data truncated for column 'taxst2' at row 1
In the echeck.sql, under the create table directive, taxst2 is defined as:
`taxst2` enum('0','1') NOT NULL default '0',
and line 894 in the file is as follows
INSERT INTO `tbl_tax` (`taxid`, `taxdesc1`, `taxper1`, `taxst1`, `taxdesc2`, `taxper2`, `taxst2`, `taxdesc3`, `taxper3`, `taxst3`, `taxdesc4`, `taxamt1`, `taxst4`, `taxdesc5`, `taxamt2`, `taxst5`, `tax_prt_id`) VALUES
(1, 'tax1', 0.00, '1', '', 0.00, '', 'tax2', 0.00, '', 'tax4', 0.00, '1', '', 0.00, '', 26),
(2, 'taxa', 2.00, '1', 'taxb', 2.00, '1', 'taxc', 2.00, '1', 'taxd', 23.00, '1', 'taxE', 2.00, '1', 52);
Where is the problem? How do I correct it?
•
•
Join Date: Dec 2007
Posts: 195
Reputation:
Solved Threads: 27
It seems to be a MySQL bug like this http://bugs.mysql.com/bug.php?id=9029.
Do you have latest MySQL version?
Also try source command.
Do you have latest MySQL version?
Also try source command.
![]() |
Similar Threads
- VB6 Database Program (Visual Basic 4 / 5 / 6)
- Student Database Design (Database Design)
- Need some ideas on building an exam result database. Assistance appreciated. (Database Design)
- General rules for building a database (MySQL)
- An OpenSource Database (C++)
- Building a database application (C++)
Other Threads in the MySQL Forum
- Previous Thread: retrieve data frm 2 tables
- Next Thread: Incorrect string value
Views: 2007 | Replies: 19
| Thread Tools | Search this Thread |
Tag cloud for MySQL
"use" 1 amazon api aws bizspark breathalyzer changingprices cmg communityjournalism contentmanagement contractors copyright count court crm data database design developer development distinct drupal dui ec2 eliminate email enterprise eudora facebook form foss gartner gnu government gpl groklaw groupware hiring hyperic images innerjoins insert ip joebrockmeier journalism keyword keywords kickfire laptop law legal license licensing linux managing mariadb matchingcolumns metron micromanage microsoft microsoftexchange mindtouch montywidenius mozilla multiple mysql mysqlcolumnupdating mysqlindex mysqlinternalqueries mysqlsearch news opendatabasealliance opengovernment opensource operand oracle pdf penelope php priceupdating query referencedesign remove reorderingcolumns resultset search select simpledb sourcecode spotify sql statement sugarcrm syntax techsupport thunderbird transparency update virtualization





