I would like to write a stored procedure where I can update the table based on the following criteria.
Table
EmployeeID GroupID Group#
123 G123 3
456 G456 3
789 G789 3
101 G101 3
View
GroupID_Granular GroupID_Middle GroupID_Executive
G123 M123 E123
G789 M789 E789
If the GroupID is found in the "Views GroupID_Granular" column, refresh the table, set GroupID = GroupID_Executive and set Group No. 1.
I am not sure how to check / compare and then run Update cmd.
thank
source
share