-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathPaxton.sql
More file actions
58 lines (40 loc) · 1.2 KB
/
Copy pathPaxton.sql
File metadata and controls
58 lines (40 loc) · 1.2 KB
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
use Net2
--select top 10 AccessLevelId, *
select *
from users
where surname = 'Burnett'
and firstname = 'Dan'
--where /*firstname = 'Annabel Turner / Benedict Heaney'
--and*/ (Field14_50 is null or Field14_50 = '') -- Field14_50 shows in the UI as personnel number
--and userid > 0 -- system users are 0 or less
--and active = 1 -- I think "deleting" a user in the gui sets this to 0
--begin tran
--select top 100 *
--from users
--update users set departmentid = 0
--where departmentid <> 0
--select top 100 *
--from users
--commit
--select top 100 * from departments
--select top 100 * from [Access levels]
--sp_tables
--select top 10 AccessLevelId, *
--from users
--where firstname = 'Temp user' --'Payne' --and firstname = 'Robert'
--select * -- Field14_50 as BEC_Number
--from users
--where Field14_50 is not null and Field14_50 <> ''
--select *
--from users
--where firstname + ' ' + surname in
--(
-- select firstname + ' ' + surname --, count(firstname + ' ' + surname)
-- from users
-- group by firstname + ' ' + surname
-- having count(firstname + ' ' + surname) > 1
--)
--order by firstname + ' ' + surname
--select top 1000 *
--from users
--where field13_Memo is not null and Field13_Memo not like ''