Managing Ad Hoc Queries
This guide explains how to define and manage ad hoc queries in Funderr. Ad hoc queries allow you to retrieve specific data from the system using SQL (Structured Query Language). They are useful for creating custom reports and analyses that are not available through the standard reporting features.
1. Understanding Ad Hoc Queries
Ad hoc queries enable you to directly query the Funderr database using SQL. This gives you the flexibility to extract data based on specific criteria and create customized reports or analyses. Ad hoc queries require a good understanding of SQL and the Funderr database schema.
2. Accessing the Ad Hoc Query Settings
To access the Ad Hoc Query settings screen, follow these steps:
2.1 Navigate to Organization Settings: Follow the steps to access the Organization Settings screen (Admin -> Organization). See topic Managing Organization Settings.
2.2 Click AdHocQuery: From the list of organization settings, click "AdHocQuery."
Now you should see the Ad Hoc Query Screen.
3. Viewing Existing Ad Hoc Queries
Once you've accessed the Ad Hoc Query screen, you can view a list of existing queries:
3.1 Review the List: The screen displays a list of existing queries, including the name, SQL query, table affected, and other details.
4. Creating New Ad Hoc Queries
To create a new ad hoc query, follow these steps:
4.1 Click Create AdHoc Query: From the Ad Hoc Query screen, click the "+ Create AdHoc Query" button.
4.2 Define the Query: The "Create AdHoc Query" form will be displayed.

Name: Enter a descriptive name for the query (required). This helps identify the query later.
SQL Query: Enter the SQL query to extract the data. The user must be careful that the input is valid SQL.
Insert into table: This is where the report will be saved as.
Table Fields: Enter the tables affected.
Email: Enter the emails the report can be sent to
Report Run Frequency: Select how often to run the report.
Active Mark the report as active if you'd like to start running the report
Make the input valid and be careful.
