db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Knut Anders Hatlen (JIRA)" <j...@apache.org>
Subject [jira] Closed: (DERBY-4535) Data export/import issue
Date Tue, 02 Feb 2010 10:52:18 GMT

     [ https://issues.apache.org/jira/browse/DERBY-4535?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]

Knut Anders Hatlen closed DERBY-4535.
-------------------------------------

            Resolution: Invalid
    Bug behavior facts:   (was: [Data corruption])
      Issue & fix info:   (was: [High Value Fix])

Please ask questions about how to use Derby on derby-user@db.apache.org, and not in the bug
tracker. Closing this bug report as invalid.

For the record, the answer to your question is that you should declare the UID column as GENERATED
BY DEFAULT, not as GENERATED ALWAYS, if you intend to specify a value for that column on some
occasions.

> Data export/import issue
> ------------------------
>
>                 Key: DERBY-4535
>                 URL: https://issues.apache.org/jira/browse/DERBY-4535
>             Project: Derby
>          Issue Type: Bug
>          Components: SQL
>            Reporter: Vijender
>            Priority: Critical
>
> Hi,
> I have created table as shown below.
> CREATE TABLE ebics_order_type_gvo (
>   uid                   INTEGER   NOT NULL   GENERATED ALWAYS AS IDENTITY ( START WITH
1, INCREMENT BY 1 )   PRIMARY KEY,
>   gvo_code              VARCHAR(3)   NOT NULL   UNIQUE,
>   gvo_desc              VARCHAR(80)
>   );
> And using below query to insert values.
> INSERT INTO EBICS_ORDER_TYPE_GVO (UID,GVO_CODE,GVO_DESC) VALUES (100,'VIJ','desc');
> Getting below error.
> Error: java.sql.SQLException: Attempt to modify an identity column 'UID'. , SQL State:
42Z23, Error Code: -1
> But if remove ( START WITH 1, INCREMENT BY 1 )  from the above table creation it is working
file.
> Can you pls help me how to import data without removing the above condition?
> Thanks in advance.
> Vijender.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.


Mime
View raw message