INSERT WHERE NOT EXISTS syntax

2008-01-23 Thread roger.maynard
Can anyone tell me why this isn't working... v5.0 INSERT INTO master_comments (comment_no,comment_text,language_id) SELECT comment_no,comment_text,language_id from mComments WHERE NOT EXISTS (SELECT comment_no FROM master_comments); I thought I had it working once but now it isn't?

RE: INSERT WHERE NOT EXISTS syntax

2008-01-23 Thread roger.maynard
else . -Original Message- From: roger.maynard [mailto:[EMAIL PROTECTED] Sent: 23 January 2008 18:58 To: mysql@lists.mysql.com Subject: INSERT WHERE NOT EXISTS syntax Can anyone tell me why this isn't working... v5.0 INSERT INTO master_comments (comment_no,comment_text

Re: INSERT IF NOT EXISTS?

2002-05-28 Thread Markus Lervik
(feed the hungry filters: sql, query) On Monday 27 May 2002 2:14 pm, Victoria Reznichenko wrote: ML Is there a simple way to do something like INSERT IF NOT EXISTS, ML other than first doing a SELECT and checking if it returns any rows? ML If not, that would be pretty high up on my whish

Re: Re: INSERT IF NOT EXISTS?

2002-05-28 Thread Victoria Reznichenko
Markus, Tuesday, May 28, 2002, 2:15:09 PM, you wrote: You can use IGNORE keyword in INSERT statement, but it's not quite the same as INSERT IF NOT EXIST. If you specify IGNORE, any rows that duplicate an existing PRIMARY or UNIQUE key in the table will be ignored in INSERT: ML Yes, I was

INSERT IF NOT EXISTS?

2002-05-27 Thread Markus Lervik
(filter fodder: sql, query) Hello group! Quick question: Is there a simple way to do something like INSERT IF NOT EXISTS, other than first doing a SELECT and checking if it returns any rows? If not, that would be pretty high up on my whish-list : ) Cheers, Markus -- Markus Lervik Linux

Re: INSERT IF NOT EXISTS?

2002-05-27 Thread João Paulo Vasconcellos
On Monday 27 May 2002 10:59, Markus Lervik wrote: (filter fodder: sql, query) Hello group! Quick question: Is there a simple way to do something like INSERT IF NOT EXISTS, other than first doing a SELECT and checking if it returns any rows? If not, that would be pretty high up on my

Re: INSERT IF NOT EXISTS?

2002-05-27 Thread Victoria Reznichenko
Markus, Monday, May 27, 2002, 4:59:30 PM, you wrote: ML Is there a simple way to do something like INSERT IF NOT EXISTS, ML other than first doing a SELECT and checking if it returns any rows? ML If not, that would be pretty high up on my whish-list : ) You can use IGNORE keyword in INSERT

Re: INSERT IF NOT EXISTS?

2002-05-27 Thread Rob
Is there a simple way to do something like INSERT IF NOT EXISTS, ML other than first doing a SELECT and checking if it returns any rows? ML If not, that would be pretty high up on my whish-list : ) You can use IGNORE keyword in INSERT statement, but it's not quite the same as INSERT IF NOT EXIST