ImportSalesforceQuery Script Examples: Difference between revisions

From QPR ProcessAnalyzer Wiki
Jump to navigation Jump to search
(403051)
 
No edit summary
Line 1: Line 1:
This page contains script examples for the [[Supported_QPR_ProcessAnalyzer_Commands_in_Scripts#--.23ImportSalesforceQuery|ImportSalesforceQuery]] script command.
This page contains script examples for the [[QPR ProcessAnalyzer Scripting Commands#--.23ImportSalesforceQuery|ImportSalesforceQuery]] script command.


The following example will load date data from the "Contact" table in the Salesforce cloud and put that data into the "ExampleDataTable" data table in the "ExampleProject" project. It will then get the Data Table analysis from the "ExampleDataTable", put that into the "#TABLE" temporary table and then show the contents of that table.
The following example will load date data from the "Contact" table in the Salesforce cloud and put that data into the "ExampleDataTable" data table in the "ExampleProject" project. It will then get the Data Table analysis from the "ExampleDataTable", put that into the "#TABLE" temporary table and then show the contents of that table.

Revision as of 07:43, 7 February 2018

This page contains script examples for the ImportSalesforceQuery script command.

The following example will load date data from the "Contact" table in the Salesforce cloud and put that data into the "ExampleDataTable" data table in the "ExampleProject" project. It will then get the Data Table analysis from the "ExampleDataTable", put that into the "#TABLE" temporary table and then show the contents of that table.

(SELECT 'ProjectName', 'ExampleProject') UNION ALL
(SELECT 'DataTableName', 'ExampleDataTable') UNION ALL
(SELECT 'Append', '0') UNION ALL
(SELECT 'SalesforceUser', 'example.user@qpr.com')  UNION ALL
(SELECT 'SalesforcePW', 'examplepassword')  UNION ALL
(SELECT 'SalesforceQuery', 'SELECT CreatedDate FROM Contact')
--#ImportSalesforceQuery

(SELECT 'AnalysisType', '18') UNION ALL 
(SELECT 'ProjectName', 'ExampleProject') UNION ALL
(SELECT 'MaximumCount', '0') UNION ALL 
(SELECT 'DataTableName', 'ExampleDataTable') UNION ALL 
(SELECT 'TargetTable', '#TABLE') 
--#GetAnalysis 

(SELECT * FROM #TABLE) 
(SELECT 'MaximumCount', '0') 
--#ShowReport