HEIDENHAIN TNC 620 User Manual page 336

Klartext programming
Hide thumbs Also See for TNC 620:
Table of Contents

Advertisement

9
SQL EXECUTE with the SQL instruction SELECT
The SQL server places the data in the result set row-by-row. The
rows are numbered in ascending order, starting with 0. The SQL
commands FETCH and UPDATE use these row numbers (the
INDEX).
SQL EXECUTE, in conjunction with the SQL instruction SELECT,
selects the table values, transfers them to the result set, and always
opens a transaction in the process. Unlike the SQL command
SQL SELECT, the combination of SQL EXECUTE and the SELECT
instruction allows multiple columns and rows to be selected at the
same time.
In the function SQL ... "SELECT...WHERE...", you can enter the
search criteria. You thereby restrict the number of rows to be
transferred. If you do not use this option, then all of the rows in the
table are loaded.
In the function SQL ... "SELECT...ORDER BY...", you can enter the
ordering criterion. This entry consists of the column designation and
the keyword ASC for ascending or DESC for descending order. If you
do not use this option, then rows will be stored in a random order.
With the function SQL ... "SELECT...FOR UPDATE", you can lock
the selected rows for other applications. Other applications can
continue to read these rows but are unable to change them. If you
make changes to the table entries, then it is absolutely necessary to
use this option.
Empty result set: If no rows meet the search criterion, then the SQL
server returns a valid HANDLE without table entries.
Define Parameter number for result
In the specified parameters, the control stores
the HANDLE under which the read operation will
subsequently occur. The HANDLE is valid until you
confirm or reject the transaction.
Database: SQL instruction: Program an SQL
instruction
336
The return value serves as an identifying
feature of a successfully opened transaction
The return value is used to control the read
operation
0: Faulty read operation
Unequal to 0: Return value of the HANDLE
SELECT: Table columns to be transferred
(separate multiple columns with ,)
FROM: Synonym or absolute path of the table
(path in single quotation marks)
WHERE (optional): Column names, condition,
and comparison value (Q parameters after : in
single quotation marks)
ORDER BY (optional): Column names and type
of ordering (ASC for ascending and DESC for
descending order)
FOR UPDATE (optional): To lock other
processes from performing a write access to
the selected rows
Programming Q parameters | Accessing tables with SQL statements
HEIDENHAIN | TNC 620 | Klartext Programming User's Manual | 01/2022

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tnc 620 eTnc 620 programming station

Table of Contents