Sybase Adaptive Server IQ 12.4.2 Administration And Performance Manual page 221

Table of Contents

Advertisement

29
3
200
4
59
5
(5 rows affected)
Using the FILLER
Option
Example 3
ps_partkey
ps_suppkey
----------
----------
213
NULL
24
NULL
(2 rows affected)
ps_partkey
ps_suppkey
----------
----------
CHAPTER 5
28
13
9
To ensure that the data from the second two columns is inserted into the same
rows as the first two columns, you must specify the row number in the
option on the
ROW ID
INSERT
The
option tells Adaptive Server IQ which columns in the input file
FILLER
to skip. This
LOAD TABLE
columns, because those columns are skipped. Note that these columns must
allow NULLs in order for this statement to work.
For this next Windows NT example, assume the
columns,
and
ps_partkey
index.
The data for
is calculated from
ps_value
must already contain data. Therefore, to insert data into the
two inserts: one for
ps_availqty
First, insert the data for
partsupp
LOAD TABLE partsupp
(ps_partkey ASCII(6),
ps_availqty ASCII(6),
FILLER(2))
FROM 'C:\\iq\\archive\\mill1.txt'
SELECT *, rowid(partsupp) FROM partsupp
ps_availqty
-----------
190
215
Next select the
ps_availqty
an
command to insert the results of a
INSERT
INSERT INTO partsupp(ps_value)
START ROW ID 1
SELECT ps_availqty * 0.80 FROM partsupp
SELECT *, rowid(partsupp) FROM partsupp
ps_availqty
-----------
Moving Data In and Out of Databases
1376
119
4
command for the next two columns.
statement inserts NULLs into the second two
partsupp
, and that
ps_availqty
partsupp
ps_availqty
and
and then one for
ps_partkey
directly from an ASCII file named tt.t.
ps_value
rowid(partsupp)
--------
---------------
NULL
1
NULL
2
and do an 80% calculation. In this case you must use
SELECT
ps_value
rowid(partsupp)
--------
---------------
3
4
5
START
table has two
is not part of any join
so the
column
ps_availqty
table, do
partsupp
.
ps_value
statement.
201

Advertisement

Table of Contents
loading

Table of Contents