Manual SQL Queries

Modified on Sun, 26 Jul at 4:29 AM

Overview

QQube is designed to hide the complexity of retrieving QuickBooks data. However, a project developer may occasionally need to create a custom SQL query for a specific reporting or extraction requirement.

The QQube Excel Add-In provides a practical starting point because it acts as the front end to Microsoft Query. QQube generates the initial SQL statement automatically, so you do not need to write the complete query from scratch.

Recommended Workflow

Use the QQube Excel Add-In to select the required fields, retrieve the generated SQL statement from the connection properties, and then modify that statement for the project's specific needs.

Create the Starting SQL Query

1. Load the Required Data Model

Load the QQube data model that contains the information needed for the query.

Before continuing, confirm that the synchronization completed successfully and review any data synchronization errors.

QQube data model loaded and ready for use

2. Open an Excel Example and Select Fields

Open a QQube Excel example, invoke the QQube Excel Add-In, and select the fields required for the custom query.

QQube Excel Add-In with fields selected for a custom SQL query

3. Retrieve the Generated SQL Statement

Open the Excel connection properties and locate the generated SQL statement in the connection definition.

This statement provides the starting structure for the manual query.

Excel connection properties showing the QQube-generated SQL statement

Modify the SQL Statement

After retrieving the generated statement, you can add the required SQL elements, such as:

  • Additional filtering criteria.
  • Calculated expressions.
  • Grouping and aggregation.
  • Sorting.
  • Other SQL Anywhere functions supported by the QQube database.

SQL Anywhere Reference

For advanced SQL syntax, functions, and expressions, review the SQL Anywhere Version 12.0.1 reference.

QQube uses SQL Anywhere Version 17, but the relevant commands and functions have not materially changed from Version 12.x.

Expected Result

You begin with a valid SQL statement generated by QQube and then modify it to retrieve the specific QuickBooks information required by the project.

Was this article helpful?

That’s Great!

Thank you for your feedback

Sorry! We couldn't be helpful

Thank you for your feedback

Let us know how can we improve this article!

Select at least one of the reasons
CAPTCHA verification is required.

Feedback sent

We appreciate your effort and will try to fix the article