In some instances, there may be a need to export a list of billing codes or user information from the Argos database to a CSV file for external review. This can be accomplished with the activity export feature by customizing the export query to parse the related database tables.
- In Argos Manager, Reports & Data section, click on the Allocated tab and select Scheduled Export to File...
- In the Activity Export window, click Create
- In the Scheduled Activity Export window, enter a name for the task (e.g. "Billing code export" or "User account export"). Click the ellipse (...) button next to the Export folder: field and browse to the location where the exported file will be saved. Select the type of delimited file from the Export format: drop down list.
- Select the Export mode: radio button next to Custom. Click the Edit SQL... button to make changes to the export query.
- In the Custom SQL Query window, highlight and delete the default query text.
- To export a single tier of billing code names and numbers, enter the query text:
- SELECT Name, Number FROM argBillingCodes
Click OK. - To export two tiers of billing code names and numbers, enter the query text:
- SELECT a.Number AS Tier1_Number, a.Name AS Tier1_Name,
b.Number AS Tier2_Number, b.Name AS Tier2_Name
FROM
(SELECT Number, Name, ID FROM argBillingCodes
WHERE Tier = '1') a
INNER JOIN
(SELECT Number, Name, ParentID FROM argBillingCodes
WHERE Tier = '2') b
ON a.ID = b.ParentID
Click OK. - SELECT a.Number AS Tier1_Number, a.Name AS Tier1_Name,
- To export three tiers of billing code names and numbers, enter the query text:
- SELECT a.Number AS Tier1_Number, a.Name AS Tier1_Name,
b.Number AS Tier2_Number, b.Name AS Tier2_Name,
c.Number AS Tier3_Number, c.Name AS Tier3_Name
FROM
(SELECT Number, Name, ID FROM argBillingCodes
WHERE Tier = '1') a
INNER JOIN
(SELECT Number, Name, ParentID FROM argBillingCodes
WHERE Tier = '2') b
ON a.ID = b.ParentID
INNER JOIN
(SELECT Number, Name, ParentID FROM argBillingCodes
WHERE Tier = '3') c
ON a.ID = c.ParentID
Click OK. - SELECT a.Number AS Tier1_Number, a.Name AS Tier1_Name,
- To export user account information WITH PIN CODES defined, enter the query text:
- SELECT
a.UserName
,a.DomainName
,b.FirstName
,b.LastName
,b.Email
,d.GroupName
,e.PIN
FROM argUserAccounts a
INNER JOIN argUserContactInfo b
on a.UserId = b.UserId
INNER JOIN argUsers c
on a.UserId = c.ID
INNER JOIN argUserGroups d
on c.GroupID = d.ID
INNER JOIN argUserPins e
on a.UserID = e.UserID
order by a.username
Click OK. - SELECT
- To export user account information WITHOUT PIN CODES defined, enter the query text:
- SELECT
a.UserName
,a.DomainName
,b.FirstName
,b.LastName
,b.Email
,d.GroupName
FROM argUserAccounts a
INNER JOIN argUserContactInfo b
on a.UserId = b.UserId
INNER JOIN argUsers c
on a.UserId = c.ID
INNER JOIN argUserGroups d
on c.GroupID = d.ID
order by a.username
Click OK. - SELECT
- In the Schedule Activity Export window, select I will write my own from the Date filtering: drop down list. In the Advanced options: section, check the boxes next to any required file formatting options. Enter any adjustments to the file name into the File prefix: or File suffix: fields as needed.
- Click OK to save the settings.
- In the Activity Export window, click the Run button to execute the export.
0 Comments