10 .9 a ccessing t a bles with sql commands – HEIDENHAIN TNC 320 (340 551-01) User Manual
Page 351
HEIDENHAIN TNC 320
351
1
0
.9 A
ccessing T
a
bles with SQL Commands
8
Parameter no. for result:
Q parameter for the
handle. The SQL server returns the handle for the
group of columns and rows selected with the current
select command.
In case of an error (selection could not be carried out),
the SQL server returns the code 1.
Code 0 identifies an invalid handle.
8
Data bank: SQL command text:
with the following
elements:
SELECT
(keyword): Name of the SQL command
Names of the table columns to be transferred.
Separate column names with a comma (see
examples). Q parameters must be bound to all
columns entered here.
FROM
table name: Synonym or path and file name of
this table. The synonym is entered directly, whereas
the path and table name are entered in single
quotation marks (see examples).
Optional:
WHERE
selection criteria: A selection criterion consists
of a column name, condition (see table) and
comparator. Link selection criteria with logical AND or
OR.
Program the comparator directly or with a
Q parameter. A Q parameter is introduced with a
colon and placed in single quotation marks (see
example).
Optional:
ORDER BY
column name ASC to sort in ascending
order—or
ORDER BY
column name DESC to sort in descending
order.
If neither ASC nor DESC are programmed, then
ascending order is used as the default setting.
The selected rows are placed in the order determined
by the indicated column.
Optional:
FOR UPDATE
(keyword): The selected rows are locked
against write-accesses from other processes.