Created
February 20, 2013 21:03
-
-
Save meganmcchesney/4999593 to your computer and use it in GitHub Desktop.
insert weights from PartPackage to PartAttribute where PartAttribute.field = 'weight' is null
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
use CurtDev | |
INSERT INTO PartAttribute (partID, value, field) | |
SELECT partID, weight, 'Weight' | |
FROM PartPackage | |
WHERE PartPackage.partID IN ( | |
/*the group of partIDs to update*/ | |
SELECT partID | |
FROM Part | |
WHERE partID NOT IN | |
(SELECT partID | |
FROM PartAttribute | |
WHERE field = Upper ('WEIGHT'))) | |
order by partID |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment