Put together (Merge) two tables in one

2001-07-20 Thread Martin Cabrera Diaubalick

Hello everyone,

I have two tables each with 12K records, I need to merge them into one single table 
and also check for duplicates. I'm thinking in doing it with PHP and Mysql. My idea 
involves one SELECT query and almost 12K insert query. Is there a faster way of doing 
using only MySQL?

Thanks in advance
Regards

-
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: Put together (Merge) two tables in one

2001-07-20 Thread Werner Stuerenburg

Wouldn't you do this in a loop? Where is the problem?

 I have two tables each with 12K records, I need to merge them into one single table 
and also check for duplicates. I'm thinking in doing it with PHP and Mysql. My idea 
involves one SELECT query and
 almost 12K insert query. Is there a faster way of doing using only MySQL?




-- 
Herzlich
Werner Stuerenburg

_
ISIS Verlag, Teut 3, D-32683 Barntrup-Alverdissen
Tel 0(049) 5224-997 407 ยท Fax 0(049) 5224-997 409
http://pferdezeitung.de



-
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




SV: Put together (Merge) two tables in one

2001-07-20 Thread Johan Nilsson

See section: 7.21.1 INSERT ... SELECT Syntax

Regards,
Johan Nilsson
Software Developer
BeCon Mobile Internet AB, Sweden
Web: http://www.beconmobile.com
E-Mail: [EMAIL PROTECTED]
Office: +46 457 44184
Cellular: +46 709 798897

 -Ursprungligt meddelande-
 Fran: Martin Cabrera Diaubalick [mailto:[EMAIL PROTECTED]]
 Skickat: den 20 juli 2001 11:27
 Till: [EMAIL PROTECTED]
 Kopia: [EMAIL PROTECTED]
 Amne: Put together (Merge) two tables in one
 
 
 Hello everyone,
 
 I have two tables each with 12K records, I need to merge them 
 into one single table and also check for duplicates. I'm thinking 
 in doing it with PHP and Mysql. My idea involves one SELECT query 
 and almost 12K insert query. Is there a faster way of doing using 
 only MySQL?
 
 Thanks in advance
 Regards
 
 -
 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
 
 

-
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