SQL statements used for SQL queries are primarily SELECT statements and for SQL commands INSERT, UPDATE or DELETE statements.
Enter the SQL statement in the left window of the SQL query tab or SQL command tab of the module. You can write the statement directly in the window or paste using copy & paste.
Only use statements that the connected database server can execute. The syntax of the SQL statement must be correct and written in the SQL dialect of the database system. ibaPDA does not offer any plausibility check of the SQL statement!
ibaPDA highlights some syntax elements in color to provide support:
-
Keywords/statements/operations: blue
-
Comments: green
-
Optional SQL parameters: magenta
The highlighting differs for each DB system type because every SQL dialect has different keywords or usage forms of parameters. For example, parameters are marked with a colon ":" for Oracle and they are marked with an at sign "@" for SQL Server.
One SQL statement is permitted per module.
A distinction is made between SQL statements with and without parameters. With an SQL query without parameters, you get the current values of the respective queried columns from the database as the result and assign these values directly to the module signals.
You can use parameters to dynamically link the query to certain conditions in order to create a differentiated query.
