Raw SQL Reports
Raw SQL Reports is a premium feature that allows you to create reports in Apricot by typing a SQL (Standard Query Language) statement into a report section, instead of dragging in columns as you would in a traditional report. SQL queries can expand the options available for reporting.
Please note: SQL features in Apricot cover advanced Select statements but do not allow for Update, Insert, or Delete functions. Please check out our Imports Tool for updating or creating records in bulk.
Do You Have Access to Raw SQL Reports?
Raw SQL Reports is a premium feature, which means it is not available in every Apricot. To find out if you have access to this feature,
Click the Administrator tab at the top of the page.
In the left hand menu, select Apricot Settings under Workflow Station.
Scroll down to the section called "A La Carte Features" and check that Raw SQL Reports has been enabled.
If you do not have access to this feature but you are interested in it, please contact your account manager. If you do not have contact information for your account manager, you can contact Apricot Support to get it.
Add a SQL Section to a Report
To add a SQL section to a report, create a new report or open an existing report for editing in the Report Builder.
In the Report Actions palette, select "Create New SQL Section." This will add a new blank text box to your report where you can enter a SQL query.
Click into the text box and begin typing to enter your query to the report.
When you are finished, click Publish Report to allow your users access to these results.
Using a SQL Report as a Data Dictionary
SQL queries can be written to satisfy a wide variety of reporting needs. A simple SQL query can create a "data dictionary" that describes the back-end labels given to each field in your Apricot database. This information can be useful if you need to reference this information in a different SQL report.
Click into the text box and begin typing the SQL query. When you have finished, click out of the box to display the new SQL table.
Basic SQL Statement
Once this feature is turned on, you will also have access to view the SQL for your standard reports.
Open the section properties for any report section,
Expand the "Basic SQL Statement" option at the bottom of the properties window
Errors in SQL Report Sections
If there are any problems with your syntax in a raw SQL report section Apricot will display an error indicating which section contains the error and which line the error occurs within, along with a hint. The error message will show you only the first error that it finds, so if there are multiple errors you will need to resolve each one at a time with the aid of this pop up.
If you close out of this pop up and need to view it again, you can click this button on the right hand side of the report to review these details.
Note: Raw SQL Sections are not supported in Ongoing Support. For any consultation time for this feature it will need to be purchased. Please contact your account manager for more information.