Programming Q parameters | Accessing tables with SQL statements
Examples
The following examples do not result in a cohesive NC program.
The NC blocks show only possible uses of the SQL command SQL
EXECUTE.
9 SQL Q1800 "CREATE SYNONYM my_table FOR 'TNC:-
\table\WMAT.TAB'"
9 SQL Q1800 "DROP SYNONYM my_table"
9 SQL Q1800 "CREATE TABLE my_table (NO,WMAT)"
9 SQL Q1800 "COPY TABLE my_table TO 'TNC:\table-
\WMAT2.TAB'"
9 SQL Q1800 "RENAME TABLE my_table TO 'TNC:\table-
\WMAT3.TAB'"
9 SQL Q1800 "DROP TABLE my_table"
9 SQL Q1800 "INSERT INTO my_table VALUES
(1,'ENAW',240)"
9 SQL Q1800 "DELETE FROM my_table WHERE NR==3"
9 SQL Q1800 "ALTER TABLE my_table ADD (WMAT2)"
9 SQL Q1800 "ALTER TABLE my_table DROP (WMAT2)"
9 SQL Q1800 "RENAME COLUMN my_table (WMAT2) TO
(WMAT3)"
SQL FETCH
SQL FETCH reads a row from the result set. The values of the
individual cells are stored by the control in the bound Q parameters.
The transaction is defined through the HANDLE to be specified, and
the row is defined by the INDEX.
SQL FETCH takes all of the columns into consideration that contain
the SELECT instruction (SQL command SQL EXECUTE).
HEIDENHAIN | TNC 620 | Klartext Programming User's Manual | 01/2022
Create synonym
Delete synonym
Create table with the rows NO and WMAT.
Copy table
Rename table
Delete table
Insert table row
Delete table row
Insert table rows
Delete table row
Rename table column
9
339