Managing SuiteQL Queries
You can write SuiteQL queries to load transaction data and metadata from NetSuite into your Planning and Budgeting application.
The SuiteQL query results don't include metadata hierarchy.
To define an SQL query:
-
In NetSuite, go to NetSuite EPM > Planning and Budgeting > Manage SuiteQL Queries.
-
On the Manage SuiteQL Queries page, do one of the following:
-
To create a new SQL query, click Add SuiteQL Query.
-
To update an existing SQL query, click Edit next to the query.
-
-
In the ID field, enter a unique ID for the SQL query you are creating.
Important:The integration recognizes IDs the prefixes of which begin with
custsql_
. If you omit this prefix,custsql_
is automatically prepended. -
In the Name field, enter a unique name for the SQL query you are creating.
-
In the Result Column Labels field, enter the names of your SuiteQL query result columns, separated by commas.
-
In the Query field, provide the query details.
Read the following guidelines on how to add filters in SuiteQL queries:
-
Add only the filters you want to make available in Data Exchange.
-
To filter values using the '@' sign, keep the following in mind:
-
You can use the '@' sign to specify parameter placeholders for filters. For example, see the following query where a date is used as a filter:
select top 10 memo from transaction where createddate > to_date(@datecreatedfilter@, 'DD-MM-YYYY');
When using this query, ensure that the value you provide for
datecreatedfilter
matches the date format specified in theto_date
function. Here are a couple of examples:-
If your date is '31-07-2020', the query should be:
select top 10 memo from transaction where createddate > to_date('31-07-2020', 'DD-MM-YYYY');
-
If your date and time is '2015/05/15 8:30:25', the query should be:
select top 10 memo from transaction where createddate > to_date('2015/05/15 8:30:25', 'YYYY/MM/DD HH:MI:SS');
-
-
Using the '@' sign to separate values in
IN
clauses is not supported.
Note:The filter placeholders will become available in Data Exchange, and their values should be set during Data Integration execution. There are no default values set for these placeholders.
-
-
-
Click Save.
-
To ensure the integration recognizes the created SQL query, place the
custsql_
prefix on the Planning and Budgeting allowlist. For instructions, see Data Source Allowlist.
For general information about SuiteQL, see SuiteQL.
Related Topics
- Planning and Budgeting Sync Installation and Setup
- Required Features for Installing the Planning and Budgeting Sync SuiteApp
- Installing the Planning and Budgeting Sync SuiteApp
- Role Permissions for Planning and Budgeting Sync Users
- Setting Up the Integration User for Planning and Budgeting Sync
- Setting Up Token-based Authentication for Planning and Budgeting Sync
- Setting Up the Connection to Planning and Budgeting
- Scheduling Script Deployments for Planning and Budgeting Sync
- Planning and Budgeting Sync Configuration Checklist
- Saved Searches for Planning and Budgeting Sync
- Managing the Planning and Budgeting Sync Saved Searches
- Saved Search Settings in Planning and Budgeting Sync
- Metadata Export in Planning and Budgeting Sync
- Account Metadata Hierarchy in Planning and Budgeting Sync
- Using SuiteAnalytics Datasets with Planning and Budgeting Sync
- Managing Jobs in Planning and Budgeting Sync
- Substitution Variables in Planning and Budgeting Sync
- Forms and Dashboards in Planning and Budgeting Sync
- Import/Export Configuration
- Integration Artifacts
- Planning and Budgeting Sync Portlets