KI_SET_ROWS
Argument | Enumeration | Purpose |
---|---|---|
h | Table handle | |
SYM(view$) | Symbol of row buffer for a view | |
SYM(rowid$()) | Location of rows in table, zero for all of them | |
nRows | Optional, rows to set, zero means use array size | |
status | KDB_ERROR_ENUM | Return status |
This can be used to set the value of one or more columns in a batch of rows from a table. The rowid$() array contains the rowids of the rows to be update. It should be a single dimensioned array with each element an instance of the _KDB_ROWID record. The array can be sized to the number of rowids available but, if larger, the actual number of rowids in the array can be specified with the optional nRows parameter. A zero value for this parameter implies that all the array elements are significant.
The view$ buffer should be a view appropriate to the table defining the columns to be updated. Each of the columns in the view will be updated using the values taken from this row buffer. The view must not include any word search indexed columns, any BLOB columns or the partitioning column for a partitioned table.
This function can be enclosed in a WHILE TRANS transaction but if used outside of a transaction it will execute in an internal transaction guaranteeing an atomic result. Because it uses a temporary table and Oracle DDL will commit any transaction, the statement should not be used in a WHILE TRANS for Oracle.
If a rowid is not found in a KDB7 table then a _KE_NOTFOUND error will be reported and the operation will be abandoned at that point. On an SQL database like Oracle the error will be silently ignored.
Not available for KDB6 or earlier.