Can a deleted LoginID's Personal Call Groups be restored from a Development database?

Version 1

    Details

    If a Production LoginID is deleted, all personal Call Groups will also be deleted.  If that LoginID is then re-created, is there a way to restore to Production those Call Groups owned by that LoginID from Development?


    Resolution

     

    --  This outlines copying the Call Groups from a Development DB in case the LoginID was deleted in Production.
    --  Replace the naming conventions of "Prod" and "Dev" with proper database names.
    --  This assumes that the LoginID has already been re-created in the Production DB.
    --  This also assumes that the LoginID was "Admin", this needs to be changed if different.
    --  Make sure the Production database is backed up prior to running any INSERT statements.

    INSERT INTO Prod.dbo.HEATGrp (GroupName,Descrip,Tracker, 
    GroupType,AccType,ListFrom,ListJoin,ListWhere,ListOrder,
    Owner,Category,CatName,CustType,ShowDashBoard)
    SELECT * FROM Dev.dbo.HEATGrp
    WHERE Owner = 'Admin'