12 messages in com.mysql.lists.win32Re: Multiple Inserts
FromSent OnAttachments
C. Javier Castro Peña04 Mar 2000 16:07 
sin...@mysql.com05 Mar 2000 02:28 
S. R.05 Mar 2000 16:11 
C. Javier Castro Peña05 Mar 2000 16:38 
C. Javier Castro Peña05 Mar 2000 16:38 
sin...@mysql.com06 Mar 2000 06:07 
sin...@mysql.com06 Mar 2000 06:09 
S. R.06 Mar 2000 06:16 
Peter Carter06 Mar 2000 17:26 
S. R.07 Mar 2000 19:21 
sin...@mysql.com08 Mar 2000 04:40 
José Ostos Turner08 Mar 2000 14:18 
Subject:Re: Multiple Inserts
From:S. R. (sra@us.hsanet.net)
Date:03/07/2000 07:21:14 PM
List:com.mysql.lists.win32

Actually I did have the "values" keyword in there.. I mistyped.. Here is what some of my sql looks like:

INSERT INTO MasterEventsUpdate VALUES (90051417,90000123,150502,'UCLA Bruins vs. Arizona ','Women\'s College Basketball.','','2000-02-19','1899-12-30',0,'','','','','2000-01-24',''); INSERT INTO MasterEventsUpdate VALUES (90051418,90000052,150600,'Spring Livestock Show','','','2000-02-09','',0,'','','','','2000-01-24',''); INSERT INTO MasterEventsUpdate VALUES (90051419,90000052,150600,'KVHW','','','2000-02-10','',0,'','','','','2000-0 1-24',''); INSERT INTO MasterEventsUpdate VALUES (90051420,90000052,150600,'Ohio Players','','','2000-02-11','',0,'','','','','2000-01-24',''); INSERT INTO MasterEventsUpdate VALUES (90051421,90000052,150600,'Anthrax','','','2000-02-12','',0,'','','','','200 0-01-24',''); INSERT INTO MasterEventsUpdate VALUES (90051422,90000052,150600,'Fu Manchu','Songs about pinball, cars and strange people.','','2000-02-12','',0,'','','','','2000-01-24',''); INSERT INTO MasterEventsUpdate VALUES (90051423,90000052,150600,'George Thorogood','','','2000-02-18','',0,'','','','','2000-01-24','');

Here is the error I get when I try to execute this: You have an error in your SQL syntax near '; INSERT INTO MasterEventsUpdate VALUES (90051418,90000052,150600,'Spring Lives' at line 1

On Mon, 06 Mar 2000, S. R. wrote:

I'm trying to run a script with multiple inserts. I used a script to convert an msaccess db to mysql

the script has:

insert into alias (20, 35, 'ABC')\g insert into alias (1, 325, 'ABCD')\g insert into alias (22, 25, 'ABCDE')\g insert into alias (230, 315, 'ABCDEF')\g I get errors on line 2 for the \g

If I replace these with ; I get an error online 2 for ; I've tried without the ; and I have tried only putting the last line with ; and I still can't get this script to work. What am I doing wrong? If I do one line at a time the insert statements work.

HI!

First of all, you need values keyword.

Second, if you are on 3.22.7 or higher, you can use:

insert into alias values (...),(...),(...),....

Regards,