tgrk35
04-30-2008, 11:30 AM
Is there a way to consolidate this:
UPDATE `departments` (`number`,`name`,`area_of_responsibility`) VALUES (1501005,'University Ombuds',11001) WHERE `number` = 1501005 LIMIT 1;
UPDATE `departments` (`number`,`name`,`area_of_responsibility`) VALUES (1501005,'University Ombuds',11001) WHERE `number` = 1501005 LIMIT 1;
UPDATE `departments` (`number`,`name`,`area_of_responsibility`) VALUES (1501005,'University Ombuds',11001) WHERE `number` = 1501005 LIMIT 1;
...into one statements such as this:
UPDATE `departments` (`number`,`name`,`area_of_responsibility`) VALUES ((1501005,'University Ombuds',11001) WHERE `number` = 1501005),((1501005,'University Ombuds',11001) WHERE `number` = 1501005),((1501005,'University Ombuds',11001) WHERE `number` = 1501005);
Of course the values wouldn't all be the same, I'm just too lazy to piece together another statement with a different WHERE clause.
Ideas?
Thanks for any and all help :)
UPDATE `departments` (`number`,`name`,`area_of_responsibility`) VALUES (1501005,'University Ombuds',11001) WHERE `number` = 1501005 LIMIT 1;
UPDATE `departments` (`number`,`name`,`area_of_responsibility`) VALUES (1501005,'University Ombuds',11001) WHERE `number` = 1501005 LIMIT 1;
UPDATE `departments` (`number`,`name`,`area_of_responsibility`) VALUES (1501005,'University Ombuds',11001) WHERE `number` = 1501005 LIMIT 1;
...into one statements such as this:
UPDATE `departments` (`number`,`name`,`area_of_responsibility`) VALUES ((1501005,'University Ombuds',11001) WHERE `number` = 1501005),((1501005,'University Ombuds',11001) WHERE `number` = 1501005),((1501005,'University Ombuds',11001) WHERE `number` = 1501005);
Of course the values wouldn't all be the same, I'm just too lazy to piece together another statement with a different WHERE clause.
Ideas?
Thanks for any and all help :)