Re: Syntax error with merge tables
Hi! > "Eric" == Eric Thelin <[EMAIL PROTECTED]> writes: Eric> On Sat, 20 Apr 2002 [EMAIL PROTECTED] wrote: >> I always get a syntax error when using INSERT_METHOD in creating merge >> tables. If I leave off the INSERT_METHOD part it works fine. I have >> tried this on many versions in the past and now on 3.23.49a. I am >> running on Mandrake Linux 8.1 but have seen this same error on other >> linux distros. It is my understanding from reading the manual that the >> following should work but it doesn't. >> CREATE TABLE mytable ( >> aINTEGER NOT NULL PRIMARY KEY, >> bCHAR(18) NOT NULL >> ) TYPE=MERGE UNION=(mytable0, mytable1, mytable2) INSERT_METHOD=LAST; >> >> Since the .MRG files are plain text could someone send me what the >> INSERT_METHOD part is supposed to look like so I can do it manually if >> needed. Thanks. The problem is that INSERT_METHOD only works in MySQL 4.0, not in 3.23 If you need this feature, then you should download the MySQL 4.0.1 distribution and try this out. The MySQL 4.0 series has been out a while now and has in practice proven to be be quite stable.. Regards, Monty -- For technical support contracts, goto https://order.mysql.com/ __ ___ ___ __ / |/ /_ __/ __/ __ \/ /Mr. Michael Widenius <[EMAIL PROTECTED]> / /|_/ / // /\ \/ /_/ / /__ MySQL AB, CTO /_/ /_/\_, /___/\___\_\___/ Helsinki, Finland <___/ www.mysql.com - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Syntax error with merge tables
Hi. On Sat, Apr 20, 2002 at 01:12:14AM -0700, [EMAIL PROTECTED] wrote: > Perhaps the INSERT_METHOD functionality was introduced in 4.0 but the > merge tables themselves work in later 3.23 versions. As I said, "INSERT for MERGE" was introduced in 4.0 (including INSERT_METHOD). Of course, MERGE tables were supported before. > If this is the case the documentation needs to be updated to show > which version supports what. >From http://www.mysql.com/doc/C/R/CREATE_TABLE.html: -- If you want to insert data in a MERGE table, you have to specify with INSERT_METHOD into with table the row should be inserted. See section 7.2 MERGE Tables. This option was introduced in MySQL 4.0.0. -- IMHO, specific enough. Regards, Benjamin. > On Sat, 20 Apr 2002, Benjamin Pflugmann wrote: > > > > AFAIK, insert for MERGE tables was introduced in version 4.0.0. Let's > > see... yep, http://www.mysql.com/doc/N/e/News-4.0.0.html says so. [...] -- [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Syntax error with merge tables
Perhaps the INSERT_METHOD functionality was introduced in 4.0 but the merge tables themselves work in later 3.23 versions. If this is the case the documentation needs to be updated to show which version supports what. Eric On Sat, 20 Apr 2002, Benjamin Pflugmann wrote: > Hi. > > AFAIK, insert for MERGE tables was introduced in version 4.0.0. Let's > see... yep, http://www.mysql.com/doc/N/e/News-4.0.0.html says so. > > Regards, > > Benjamin. > > > PS: The syntax you used should be fine with a version supporting it > > > > On Fri, Apr 19, 2002 at 04:00:02PM -0700, [EMAIL PROTECTED] wrote: > [...] > > > I always get a syntax error when using INSERT_METHOD in creating merge > > > tables. If I leave off the INSERT_METHOD part it works fine. I have > > > tried this on many versions in the past and now on 3.23.49a. I am > [...] > > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Syntax error with merge tables
Hi. AFAIK, insert for MERGE tables was introduced in version 4.0.0. Let's see... yep, http://www.mysql.com/doc/N/e/News-4.0.0.html says so. Regards, Benjamin. PS: The syntax you used should be fine with a version supporting it On Fri, Apr 19, 2002 at 04:00:02PM -0700, [EMAIL PROTECTED] wrote: [...] > > I always get a syntax error when using INSERT_METHOD in creating merge > > tables. If I leave off the INSERT_METHOD part it works fine. I have > > tried this on many versions in the past and now on 3.23.49a. I am [...] -- [EMAIL PROTECTED] - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php
Re: Syntax error with merge tables
On Sat, 20 Apr 2002 [EMAIL PROTECTED] wrote: > Your message cannot be posted because it appears to be either spam or > simply off topic to our filter. To bypass the filter you must include > one of the following words in your message: > > sql,query > > If you just reply to this message, and include the entire text of it in the > reply, your reply will go through. However, you should > first review the text of the message to make sure it has something to do > with MySQL. Just typing the word MySQL once will be sufficient, for example. > > You have written the following: > > I always get a syntax error when using INSERT_METHOD in creating merge > tables. If I leave off the INSERT_METHOD part it works fine. I have > tried this on many versions in the past and now on 3.23.49a. I am > running on Mandrake Linux 8.1 but have seen this same error on other > linux distros. It is my understanding from reading the manual that the > following should work but it doesn't. > > CREATE TABLE mytable0 ( > aINTEGER NOT NULL PRIMARY KEY, > bCHAR(18) NOT NULL > ); > > CREATE TABLE mytable1 ( > aINTEGER NOT NULL PRIMARY KEY, > bCHAR(18) NOT NULL > ); > > CREATE TABLE mytable2 ( > aINTEGER NOT NULL PRIMARY KEY, > bCHAR(18) NOT NULL > ); > > CREATE TABLE mytable ( > aINTEGER NOT NULL PRIMARY KEY, > bCHAR(18) NOT NULL > ) TYPE=MERGE UNION=(mytable0, mytable1, mytable2) INSERT_METHOD=LAST; > > Since the .MRG files are plain text could someone send me what the > INSERT_METHOD part is supposed to look like so I can do it manually if > needed. Thanks. > > Eric > > - Before posting, please check: http://www.mysql.com/manual.php (the manual) http://lists.mysql.com/ (the list archive) To request this thread, e-mail <[EMAIL PROTECTED]> To unsubscribe, e-mail <[EMAIL PROTECTED]> Trouble unsubscribing? Try: http://lists.mysql.com/php/unsubscribe.php