-
Notifications
You must be signed in to change notification settings - Fork 0
/
rc-bad-user-email.txt
83 lines (66 loc) · 4.86 KB
/
rc-bad-user-email.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
/*----------------------------------------*/
DECLARE @CurNam varchar(64) , @Email varchar(128) , @LogNam varchar(64) , @BizID varchar(64) , @First varchar(64) , @Last varchar(64)
/*------------------------------------------------------------------------------
Ricketts, Joel jxricketts ricketts.joel@con-way.com
Wilson, Kimberly kjwilson wilson.kimberly@con-way.com
Trinidad, Reynaldo trinidad.reynaldo trinidad.reynaldo@con-way.com
Maxwell, Terry maxwell.terry maxwell.terry@con-way.com
Ku, Mark ku.mark ku.mark@con-way.com
-Deleted User-9999 ? rc.deleted@con-way.com
SET @CurNam = ''
SET @NewNam = ''
SET @NewEmail = ''
SELECT * FROM CCM_USERS
WHERE EMAIL IS NULL AND LOGIN_NAME NOT LIKE '-Deleted User%'
SELECT * FROM CCM_USERS
WHERE EMAIL ='' AND LOGIN_NAME NOT LIKE '-Deleted User%'
SELECT * FROM CCM_USERS
WHERE EMAIL IS NULL AND LOGIN_NAME NOT LIKE '-Deleted User%'
SET @NewNam = 'Ku, Mark'
SET @CurNam = 'ku.mark'
SET @NewEmail = 'ku.mark@con-way.com'
UPDATE CCM_USERS
SET LOGIN_NAME = @NewNam
,EMAIL = @NewEmail
,FIRST_NAME = @NewNam
,LAST_NAME = @NewNam
WHERE LOGIN_NAME = @CurNam
SELECT * FROM CCM_USERS
WHERE LOGIN_NAME = @NewNam
SELECT * FROM CCM_USERS
WHERE EMAIL IS NULL AND LOGIN_NAME NOT LIKE '-Deleted User%'
WHERE LOGIN_NAME LIKE '-Deleted User%'
ORDER BY EMAIL
SET @NewNam = 'Bjorn, Jeanne'
SET @CurNam = 'bjorn.jeanne'
SET @NewEmail = 'bjorn.jeanne@con-way.com'
SELECT * FROM CCM_USERS
WHERE LOGIN_NAME = @CurNam
UPDATE CCM_USERS
SET LOGIN_NAME = @LogNam
,BUSINESS_ID = @BizID
,FIRST_NAME = @First
,LAST_NAME = @Last
,EMAIL = @Email
WHERE LOGIN_NAME = @CurNam
SELECT * FROM CCM_USERS
WHERE LOGIN_NAME = @NewNam
WHERE LOGIN_NAME LIKE 'bj%'
------------------------------------------------------------------------------*/
SET @CurNam = 'pxnelson'
SET @LogNam = 'pxnelson'
SET @BizID = 'pxnelson'
SET @First = 'Patrick'
SET @Last = 'Nelson'
SET @Email = 'nelson.patrick@con-way.com'
SELECT * FROM CCM_USERS
WHERE LOGIN_NAME = @CurNam
UPDATE CCM_USERS
SET LOGIN_NAME = @LogNam
,BUSINESS_ID = @BizID
,FIRST_NAME = @First
,LAST_NAME = @Last
,EMAIL = @Email
WHERE LOGIN_NAME = @CurNam
SELECT * FROM CCM_USERS
WHERE LOGIN_NAME = @LogNam