Re: INSERT ... SELECT Challenge

2007-03-12 Thread Miles Thompson
e (AttributeID, Attribute_Value). Then just do an INSERT IGNORE. The index will prevent a new non-unique from being entered and the IGNORE will prevent an error. - Original Message - From: "Miles Thompson" <[EMAIL PROTECTED]> To: Sent: Monday, March 12, 2007 3:02 PM Subje

Re: INSERT ... SELECT Challenge

2007-03-12 Thread Miles Thompson
e (AttributeID, Attribute_Value). Then just do an INSERT IGNORE. The index will prevent a new non-unique from being entered and the IGNORE will prevent an error. - Original Message - From: "Miles Thompson" <[EMAIL PROTECTED]> To: Sent: Monday, March 12, 2007 3:02 PM Subje

Re: INSERT ... SELECT Challenge

2007-03-12 Thread Brent Baisley
mpson" <[EMAIL PROTECTED]> To: Sent: Monday, March 12, 2007 3:02 PM Subject: INSERT ... SELECT Challenge I want to add records to an attributes table for every item which does not have an attribute of a given value. The problem is that some records have already had these values added.

INSERT ... SELECT Challenge

2007-03-12 Thread Miles Thompson
I want to add records to an attributes table for every item which does not have an attribute of a given value. The problem is that some records have already had these values added. Please have a look at the following query, an INSERT ... SELECT construct which I believe will do the job: INSE