Skip to content

Commit 5ac2e4f

Browse files
authored
Update UpdateSubscriptionOwner.sql
1 parent f20de30 commit 5ac2e4f

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Miscellaneous/Scripts/UpdateSubscriptionOwner.sql

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -34,20 +34,20 @@ AS
3434
(
3535
SELECT DISTINCT
3636
s.[Report_OID]
37-
, [OldOwner] = ou.UserName
38-
, [OldOwnerID] = ou.UserID
39-
, [NewOwner] = nu.UserName
40-
, [NewOwnerID] = nu.UserID
37+
, [OldOwner] = ou.[UserName]
38+
, [OldOwnerID] = ou.[UserID]
39+
, [NewOwner] = nu.[UserName]
40+
, [NewOwnerID] = nu.[UserID]
4141
FROM
42-
dbo.Subscriptions AS s
43-
INNER JOIN dbo.Users AS ou ON ou.[UserID] = s.[OwnerID]
42+
[dbo].[Subscriptions] AS s
43+
INNER JOIN [dbo].[Users] AS ou ON ou.[UserID] = s.[OwnerID]
4444
, new_owner AS nu
4545
WHERE
4646
1=1
4747
AND ou.[UserName] = N'$(OldUser)'
4848
)
4949
--SELECT * FROM subscription_source
50-
MERGE dbo.Subscriptions AS T
50+
MERGE [dbo].[Subscriptions] AS T
5151
USING subscription_source AS S ON T.[Report_OID] = S.[Report_OID]
5252
WHEN MATCHED
5353
THEN UPDATE SET

0 commit comments

Comments
 (0)