4. 作成したcsvファイルを開き、データ区切り文字「;」でセルを分け、EXCEL等の
select IP.changedate as 変更日付,
G.groupname as グループ,
IP.userid as ユーザーID,
CASE WHEN IP.activepolicy = 1 THEN '有効' ELSE '無効' END as ファイル暗号化機能,
CASE WHEN IP.autocryptpolicy = 1 THEN 'する' ELSE 'しない' END as 自動暗号化,
UC.usercategoryname as ユーザー属性,
DC.documentcategoryname as デフォルトテンプレート,
ARRAY_TO_STRING((select array_agg(DCI.documentcategoryname)
FROM usergroupirmuseabletemplate UTMP
inner join documentcategoryinfo DCI
on UTMP.documentcategoryid = DCI.documentcategoryid
and UTMP.userid = IP.userid
), ',') as 利用可能テンプレート,
CASE WHEN IP.autobackup = 't' THEN '有効' ELSE '無効' END as 自動バックアップ機能,
IP.storagelimit as 保存容量上限,
IP.generationcount as 世代管理数,
CASE WHEN IP.managementtoolpolicy = 't' THEN '有効' ELSE '無効' END as 管理ツール,
IP.menupolicy as セキュアファイルメニュー
from usergroupirmbasepolicy IP
inner join usergroupinfo UG on IP.userid = UG.userid
inner join usermasterinfo U on IP.userid = U.userid
inner join groupmasterinfo G ON G.groupid = IP.groupid
inner join usercategoryinfo UC ON UC.usercategoryid = IP.usercategoryid
inner join documentcategoryinfo DC ON DC.documentcategoryid = IP.documentcategoryid
where U.isdelete = FALSE
and UG.ismaster = TRUE
;