Hi,
Don't know exactly why it can't be done with one statement but I guess the number of logical logs is to small to fit in the complete transaction.
If that's the case then probably the easiest way, without writing a small application program, is to split the number of rows in the table into an even amount of parts with acceptable results. E.g. if the primary key values range from 1 to 100,000,000 execute 10 unload statements from 1-10,000,000, 10,000,001-20,000,000, etc.
Another way maybe is to create a temporary table without logging, fill it with a select statement and unload this table within one session, like:
Code:
CREATE TEMP TABLE example (
key INTEGER,
name CHAR(10),
ref INTEGER) WITH NO LOG;
INSERT INTO example SELECT col1, col2, col3 FROM basetable;
UNLOAD TO example.unl SELECT * FROM example;
Don't know if this works, but this way 'stuffing' and 'stripping' of the temp table will not be logged and therefore could be done with one unload action.
Regards