Hi all
Db2 8.1.3 Windows
I have to load a table with an identity column with GENERATED ALWAYS
option.
I have to load the data in the identity column as it is.
I created the table and tried this command
db2 load from tab110.ixf of ixf modified by generatedoverride insert
into wsaces.tabname for exception wsaces.tabname_excp
But I am getting this error.
SQL3526N The modifier clause "GENERATEDOVERRIDE" is inconsistent with
the
current load command. Reason code: "3".
Using any other modifiers will result in losing of the data for identity
column which we don’t want
Please advise.
Praveen
Brian Tkatch - 24 Jan 2006 16:05 GMT
db2 => ? sql3526
SQL3526N The modifier clause "<clause>" is inconsistent with the
current load command. Reason code: "<reason-code>".
Explanation:
The load file type mode (modifier) indicated, is incompatible
with your load/import/export command. This is because of one of
the following reasons:
<snip>
3. Generated or identity related file type modifiers have been
specified but the target table contains no such columns.
<snip>
Seems self-explanatory. Is this not the case?
B.
klh - 24 Jan 2006 17:04 GMT
You need to define the column as GENERATED BY DEFAULT in order to
override it on a load or import.
klh
Tomas - 25 Jan 2006 23:37 GMT
LOAD can override GENERATED ALWAYS.
/T
klh - 24 Jan 2006 17:10 GMT
You need to define the column as GENERATED BY DEFAULT in order to
override it on a load or import.
klh
--CELKO-- - 25 Jan 2006 15:20 GMT
>> have to load a table with an identity column with GENERATED ALWAYS option. <<
Unless this is a working table that will never be part of a real
working schema, why are using an identity column at all? Don't you
have a relational key? If not, then this is the least of your
problems.
Tomas - 25 Jan 2006 22:57 GMT
For a GENERATED ALWAYS AS IDENTITY column, you need IDENTITYOVERRIDE,
not GENERATEDOVERRIDE. I always get that wrong the first time. :-)
/T
Brian Tkatch - 26 Jan 2006 15:05 GMT