RE: Merge tables, was [two table's columns into one columns w/oINSERT ... SELECT?]

2002-05-06 Thread Paul DuBois

At 15:44 -0500 5/6/02, Jay Blanchard wrote:
>[snip]
>>Then I attempt to query;mysql> select count(*) from tblCross1;
>>ERROR 1016: Can't open file: 'tblCross1.MRG'. (errno: 143)
>>perror 143
>>143 = Conflicting table definition between MERGE and mapped table
>>
>>Can anyone help with this?
>
>Drop the MERGE table, then try creating it with all the columns
>in the original tables.
>[/snip]
>
>OK, that work with two of the tables, I have to merge 3. Is that possible?

Yes.

>
>Do the INDEXES have to exist on the same columns in each table? How
>identical do the tables have to be?

Identical.  Column names, types, order within tables, and indexes.

>
>Thanks!
>
>Jay
>
>P.S. Paul, couldn't help but notice your last name, where are you from?

Huh?  Wisconsin.

-
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: Merge tables, was [two table's columns into one columns w/oINSERT ... SELECT?]

2002-05-06 Thread Paul DuBois

At 15:29 -0500 5/6/02, Jay Blanchard wrote:
>I have these two tables;
>mysql> describe tblClass11;
>+--+---+--+-+-++
>| Field| Type  | Null | Key | Default | Extra  |
>+--+---+--+-+-++
>| ID   | int(11)   |  | PRI | NULL| auto_increment |
>| RecordID | varchar(6)| YES  | | NULL||
>| RecordDate   | varchar(10)   | YES  | | NULL||
>| CIC  | varchar(4)| YES  | | NULL||
>| Minutes  | decimal(12,2) | YES  | | NULL||
>| FileName | varchar(32)   | YES  | | NULL||
>| RecordNumber | int(11)   | YES  | | NULL||
>| WholeRecord  | text  | YES  | | NULL||
>| ReceivedDate | varchar(10)   | YES  | | NULL||
>+--+---+--+-+-++
>9 rows in set (0.00 sec)
>
>mysql> describe tblClassOthers;
>+--+---+--+-+-++
>| Field| Type  | Null | Key | Default | Extra  |
>+--+---+--+-+-++
>| ID   | int(11)   |  | PRI | NULL| auto_increment |
>| RecordID | varchar(6)| YES  | | NULL||
>| RecordDate   | varchar(10)   | YES  | | NULL||
>| CIC  | varchar(4)| YES  | | NULL||
>| Minutes  | decimal(12,2) | YES  | | NULL||
>| FileName | varchar(32)   | YES  | | NULL||
>| RecordNumber | int(11)   | YES  | | NULL||
>| WholeRecord  | text  | YES  | | NULL||
>| ReceivedDate | varchar(10)   | YES  | | NULL||
>+--+---+--+-+-++
>9 rows in set (0.00 sec)
>
>I attempt to MERGE;
>mysql> CREATE TABLE tblCross1 (ID INT NOT NULL,
> -> RecordID VARCHAR(6),
> -> RecordDate VARCHAR(10),
> -> Minutes DECIMAL(12,2),
> -> KEY(ID))
> -> TYPE=MERGE
> -> UNION=(tblClass11, tblClassOthers);
>Query OK, 0 rows affected (0.01 sec)
>
>Then I attempt to query;mysql> select count(*) from tblCross1;
>ERROR 1016: Can't open file: 'tblCross1.MRG'. (errno: 143)
>perror 143
>143 = Conflicting table definition between MERGE and mapped table
>
>Can anyone help with this?
>
>Thanks!
>Jay

Drop the MERGE table, then try creating it with all the columns
in the original tables.

-
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