This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
|
bw2:sql_command_tool [2021/02/09 09:51] akoehler |
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 | + | The following shows the same SELECT statement as illustrated above but with a variable in the WHERE clause. |
| - | {{ : | + | <code sql> |
| + | SELECT | ||
| + | CardCode, | ||
| + | CardName | ||
| + | FROM ocrd | ||
| + | WHERE CardCode = ' | ||
| + | </ | ||
| + | |||
| + | <WRAP center round important> | ||
| + | When saving a workflow or opening the SQL/HANA tool or the workflow, the reader command type will validate the written query. This executes the query against the connected database. **There is the ability to have Non-query commands written using the Reader command type. This will execute the statement against the database. If a Create, Update, Insert, Truncate or Delete (any SQQL/HANA statement that affects a change to any data) is written, the command will execute and be run against the connected database if the workflow is saved or the tool or workflow is opened** | ||
| + | </ | ||
| ===== Non-Query (SQL Server only) ===== | ===== Non-Query (SQL Server only) ===== | ||
| Line 126: | 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 " | 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 " | ||
| </ | </ | ||
| + | |||
| + | ====== SQL System Variables ====== | ||
| + | |||
| + | ^ Name ^ Description | ||
| + | | CommandType | ||
| + | | 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 | ||
| + | | QueryString | ||
| + | | SQLCommand | ||
| + | | SQLResultsCount | ||
| + | |StepMessage | ||
| + | | StepStatus | ||
| + | |||
| ======SQL Tips====== | ======SQL Tips====== | ||