CHAPTER 5 Moving Data In and Out of Databases
199
2
For the second and any subsequent partial-width inserts for the same set of
rows, use the
START ROW ID
option to specify the row where the insert
started. This number is the record number at the beginning of the insert
message log, as in this example:
In table ’department’, the full width insert of 3
columns
will begin at record 1.
You can also use the
ROWID
function to display the row ID, as in the following
query:
SELECT *, ROWID(
table_name) FROM table_name
Example 1
The UNIX example below shows an incorrect insertion of four columns from
the file tt.t into the indexes on the
lineitem
table. It inserts the first two columns
with one
LOAD TABLE
statement and the second two columns with another
LOAD TABLE
statement, but does not use the
START ROW ID
option to align the
additional columns.
LOAD TABLE lineitem
(l_partkey ASCII(4),
l_suppkey ASCII(4),
FILLER(13))
FROM ’/d1/MILL1/tt.t’
PREVIEW ON
NOTIFY 1000
LOAD TABLE lineitem
(FILLER(8),
l_quantity ASCII(6),
l_orderkey ASCII(6),
FILLER(1))
FROM ’/d1/MILL1/tt.t’
PREVIEW ON
NOTIFY 1000
The result of the
SELECT
statement below shows that 10 rows are stored
instead of the correct number of 5.
SELECT *, rowid(lineitem) FROM lineitem
l_orderkey l_partkey l_suppkey l_quantity rowid(lineitem)
---------- --------- --------- ------------ ---------------
NULL 1 12 NULL 1
NULL 2 37 NULL 2
Summary of Contents for Adaptive Server IQ 12.4.2
Page 1: ...Administration and Performance Guide Adaptive Server IQ 12 4 2 ...
Page 16: ...xvi ...
Page 20: ...Related documents xx ...
Page 40: ...Compatibility with earlier versions 20 ...
Page 118: ...Troubleshooting startup shutdown and connections 98 ...
Page 248: ...Importing data by replication 228 ...
Page 306: ...Integrity rules in the system tables 286 ...
Page 334: ...Cursors in transactions 314 ...
Page 396: ...Users and permissions in the system tables 376 ...
Page 438: ...Determining your data backup and recovery strategy 418 ...
Page 484: ...Network performance 464 ...
Page 500: ...System utilities to monitor CPU use 480 ...
Page 514: ...Characteristics of Open Client and jConnect connections 494 ...
Page 536: ...Index 516 ...