Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
Database Servers
DB2InformixIngresMS SQLOraclePervasive.SQLPostgreSQLProgressSybase
Desktop Databases
FileMakerFoxProMS AccessParadox
General
General DB TopicsDatabase Theory
Related Topics
Java Development.NET DevelopmentVB DevelopmentMore Topics ...

Database Forum / DB2 Topics / January 2006

Tip: Looking for answers? Try searching our database.

Identity column issue-SQL3526n

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Praveen_db2 - 24 Jan 2006 15:47 GMT
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
Good catch. :)

B.
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.