Hi, Yes it works, but you can't insert and select data from the same table with this syntax.
Regards, Jocelyn ----- Original Message ----- From: "Mirza Muharemagic" <[EMAIL PROTECTED]> To: "Eric" <[EMAIL PROTECTED]> Cc: <[EMAIL PROTECTED]> Sent: Friday, November 22, 2002 12:30 AM Subject: Re: INSERT INTO () SELECT... > Hi Eric, > > thats oracle function INSERT INTO ... SELECT. it doesn't work in > mysql. > > Mirza > [EMAIL PROTECTED] > > ______________________________________________ > 21.11.2002 22:13 > > > > Hi, > > > This should work, I think, but doesn't > > > > INSERT INTO holds (ord_num) > > SELECT orders.ord_num FROM orders > > LEFT JOIN holds ON orders.ord_num = holds.ord_num > > WHERE holds.ord_num IS NULL > > > I have some order numbers that are not in holds that are in orders. I want > > to make entries in holds to match those missing. > > > The above SELECT gives me exactly what I want, but I get > > > ERROR 1066: Not unique table/alias: 'holds' > > > > Thanks, > > > Eric > > > > mysql,sql why because we love you! > > > > > > > --------------------------------------------------------------------- > > 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 > > > > --------------------------------------------------------------------- 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