SQL Script sql -- Declare variables for schema UIDs run once DECLARE @uid1 int, @uid2 int SELECT @uid1 = uid FROM sysusers WHERE name = 'GLOBAL_COMET_US_1' SEL...
sql -- First get the user IDs once optional, for readability DECLARE @uid1 int, @uid2 int SELECT @uid1 = uid FROM sysusers WHERE name = 'GLOBAL_COMET_US_1' SELE...