Created
January 5, 2012 20:04
-
-
Save n-tran/1566969 to your computer and use it in GitHub Desktop.
DO NOT DELETE: Insert two new question_group_class and updating question_group table
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 mip_portal | |
GO | |
SET IDENTITY_INSERT question_group_class ON | |
INSERT INTO question_group_class (question_group_class_id, question_group_class_name, | |
question_group_class_created_by, question_group_class_created_date, | |
question_group_class_modified_by, question_group_class_modified_date) | |
VALUES (28, 'Influence Out', 'nghia.tran', GETDATE(), 'nghia.tran', GETDATE()), | |
(29, 'Influence In', 'nghia.tran', GETDATE(), 'nghia.tran', GETDATE()) | |
SET IDENTITY_INSERT question_group_class OFF | |
GO | |
UPDATE question_group --Influence Out | |
SET question_group_class_id = 28, | |
question_group_modified_by = 'nghia.tran', | |
question_group_modified_date = GETDATE() | |
FROM question_group | |
WHERE question_group_id IN (SELECT question_group_id | |
FROM question_group | |
WHERE question_group_comp_id = 10 | |
AND question_group_class_id != 3 | |
AND question_group_id NOT IN (6,386,589,590,591,592,726,1170,1473) | |
AND (question_group_text LIKE '%leader%' | |
OR question_group_text LIKE '%influencer%' | |
OR question_group_text LIKE '%rising%' | |
OR question_group_text LIKE '%refer%')) | |
GO | |
UPDATE question_group --Influence In | |
SET question_group_class_id = 29, | |
question_group_modified_by = 'nghia.tran', | |
question_group_modified_date = GETDATE() | |
FROM question_group | |
WHERE question_group_id IN (SELECT question_group_id | |
FROM question_group | |
WHERE question_group_comp_id = 10 | |
AND question_group_class_id != 3 | |
AND question_group_text LIKE '%refer%' | |
AND question_group_id IN (6,386,589,590,591,592,726,1170,1473)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment