Hallo Leute,
ich hab folgendes Problem mit einem Insert Statement 2 funktionieren bis jetzt einbandfrei nur genau bei diesem :
obwohl ich den gleichen Tabellen Aufbau (Datentyptechnisch) wie bei den anderen verwende nämlich diesen hier :
schreibt er mir jedes mal diese exception:
hoffe ihr könnts mir helfen
danke LG Rin
ich hab folgendes Problem mit einem Insert Statement 2 funktionieren bis jetzt einbandfrei nur genau bei diesem :
SQL:
"INSERT INTO Incidents2(SDCallID,Eroeffnet,Beschreibung,EinmelderID) " +
"SELECT import.SDCallID, import.Eroeffnet, import.Beschreibung, einmelder.EinmelderID " +
"FROM Import2 import, Einmelder2 einmelder " +
"WHERE ((import.Betroffener IS NOT NULL AND import.Betroffener <> '') " +
"AND import.Betroffener = einmelder.Einmelder) " +
"OR ((import.Betroffener IS NULL OR import.Betroffener = '') " +
"AND import.Einmelder = einmelder.Einmelder)"
obwohl ich den gleichen Tabellen Aufbau (Datentyptechnisch) wie bei den anderen verwende nämlich diesen hier :
SQL:
CREATE TABLE Incidents2 (SDCallID VARCHAR(40) PRIMARY KEY," +
"Eroeffnet VARCHAR(30)," +
"Beschreibung VARCHAR(255)," +
"EinmelderID INT)
schreibt er mir jedes mal diese exception:
Java:
java.sql.SQLIntegrityConstraintViolationException: The statement was aborted because it would have caused a duplicate key value in a unique or primary key constraint or unique index identified by 'SQL110601095210540' defined on 'INCIDENTS2'.
at org.apache.derby.impl.jdbc.SQLExceptionFactory40.getSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.Util.generateCsSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.TransactionResourceImpl.wrapInSQLException(Unknown Source)
at org.apache.derby.impl.jdbc.TransactionResourceImpl.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedConnection.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.ConnectionChild.handleException(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedStatement.executeStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.executeStatement(Unknown Source)
at org.apache.derby.impl.jdbc.EmbedPreparedStatement.execute(Unknown Source)
at Classes.Import.ImportFromCsvToAccessTable(Import.java:136)
at Forms.ImportForm$2.actionPerformed(ImportForm.java:216)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEventImpl(Unknown Source)
at java.awt.EventQueue.access$000(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.awt.EventQueue$1.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.awt.EventQueue$2.run(Unknown Source)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source)
hoffe ihr könnts mir helfen
danke LG Rin