Wiki

Scale Your Enterprise

User Tools

Site Tools


bw2:sql_command_tool

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
bw2:sql_command_tool [2022/06/07 09:50]
akoehler [Reader (SQL Server and HANA)] added information for SQL/HANA Reader statement
bw2:sql_command_tool [2023/12/29 14:09] (current)
wgates [Reader (SQL Server and HANA)]
Line 59: Line 59:
     - When variables are used, they are subject to standard syntax rules regarding text vs. numeric values. This means that text variables MUST be enclosed in single quotes.     - When variables are used, they are subject to standard syntax rules regarding text vs. numeric values. This means that text variables MUST be enclosed in single quotes.
  
-The following image shows the same SELECT statement as illustrated above but with a variable in the WHERE clause.+The following shows the same SELECT statement as illustrated above but with a variable in the WHERE clause.
  
-{{  :bw:sqlimage2.png?411x72  }}+<code sql>  
 +SELECT 
 + CardCode, 
 + CardName 
 +FROM ocrd 
 +WHERE CardCode = 'WorkFlow(Variables).Get(CardType)' 
 +</code>
  
  
Line 130: Line 136:
 Changes in the [Result] tab **DO NOT** automatically carry back to the [SQL] tab.  If you make changes in the [Result] tab that needs to be in the "real" SQL statement, you must add them manually. Once the test is modified, you should copy the code and then exit the test view and past them in the SQL section for the best results. Changes in the [Result] tab **DO NOT** automatically carry back to the [SQL] tab.  If you make changes in the [Result] tab that needs to be in the "real" SQL statement, you must add them manually. Once the test is modified, you should copy the code and then exit the test view and past them in the SQL section for the best results.
 </WRAP> </WRAP>
 +
 +====== SQL System Variables ======
 +
 +^ Name           ^ Description         ^
 +| CommandType       | The command type chosen in the SQL tool ex. Reader, Non-Query      |
 +| DataSourceFields |The fields pulled from the data source will only show up when executing the query in the SQL tool and not during a test run|
 +| DataSourceResultsTable         | The results from executing the query in the workflow. Will only show up when executing the query in the SQL tool and not during the test run      |
 +| QueryString         | The current query that is being executed     |
 +| SQLCommand        | Used for an older version of Bizweaver no longer returns a value    |
 +| SQLResultsCount         | The total amount of records that were retrieved during a query       |
 +|StepMessage       | During a failure the reason for failure will be populated here     |
 +| StepStatus        | True or False     |
 +
  
 ======SQL Tips====== ======SQL Tips======
bw2/sql_command_tool.1654609833.txt.gz · Last modified: 2022/06/07 09:50 by akoehler