-
-
Notifications
You must be signed in to change notification settings - Fork 11
/
Copy pathAccounts3_sqlite.sql
37 lines (33 loc) · 1.15 KB
/
Accounts3_sqlite.sql
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
-- Home\Library\Accounts
Select
datetime('2001-01-01', zaccount.zdate || ' seconds') as 'AccDate',
datetime('2001-01-01', zaccount.ZLASTCREDENTIALRENEWALREJECTIONDATE || ' seconds') as 'RenewalRejection',
ZACCOUNTTYPE.ZACCOUNTTYPEDESCRIPTION as 'AccTypeDescription',
ZACCOUNTTYPE.ZIDENTIFIER as 'AccountIdentifier',
zaccount.ZUSERNAME as 'Username',
zaccount.ZACCOUNTDESCRIPTION as 'Description',
case zaccount.ZACTIVE
when 0 then 'No'
when 1 then 'Yes'
end as 'Active',
case zaccount.ZAUTHENTICATED
when 0 then 'No'
when 1 then 'Yes'
end as 'Authenticated',
case zaccount.ZSUPPORTSAUTHENTICATION
when 0 then 'No'
when 1 then 'Yes'
end as 'SupportsAuth',
zaccount.ZAUTHENTICATIONTYPE as 'AuthenticationType',
ZACCOUNTTYPE.ZCREDENTIALTYPE as 'CredentialType',
ZACCOUNTPROPERTY.ZKEY as 'key',
case zaccount.ZVISIBLE
when 0 then 'No'
when 1 then 'Yes'
end as 'AccVisible',
zaccount.ZIDENTIFIER as 'Identifier',
zaccount.ZOWNINGBUNDLEID as 'OwningBundleID'
from zaccount
join ZACCOUNTTYPE on ZACCOUNTTYPE.Z_PK = zaccount.'ZACCOUNTTYPE'
join ZACCOUNTPROPERTY on ZACCOUNTPROPERTY.Z_PK = zaccount.Z_OPT
order by AccDate desc