ignite-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From vitalys <vitaly.seliva...@prudential.com>
Subject Re: INSERT and MERGE statements
Date Wed, 03 Jul 2019 13:25:30 GMT
I made INSERT working :


INSERT INTO RBCCTEVAPVP.RBCCTEVAMARGINCALCED (valuationdate,
BUSINESSRUN,REPORTINGCOMPANY,RBCCTE90MARGIN,RBCCTE90TAXADJRATIO,RBCCTE97MARGIN,RBCCTE97TAXADJRATIO,RBCCASOMARGIN,_key)
VALUES ('12-03-2019','5',99999,3.3,4.4,5.5,6.6,7.7,'12-03-2019_5_99999');

Merge still failing : 

*MERGE INTO RBCCTEVAPVP.RBCCTEVAMARGINCALCED (valuationdate,
BUSINESSRUN,REPORTINGCOMPANY,RBCCTE90MARGIN,RBCCTE90TAXADJRATIO,RBCCTE97MARGIN,RBCCTE97TAXADJRATIO,RBCCASOMARGIN,_key)
KEY (VALUATIONDATE,businessrun,reportingcompany)
VALUES ('12-03-2019','5',99999,3.3,4.4,5.5,6.6,7.7,'12-03-2019_5_99999');*

and here is an error message and stacktrace : 

org.jkiss.dbeaver.model.sql.DBSQLException: SQL Error [1001] [42000]:
Invalid column name in KEYS clause of MERGE - it may include only key and/or
affinity columns: VALUATIONDATE
	at
org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.executeStatement(JDBCStatementImpl.java:141)
	at
org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.executeStatement(SQLQueryJob.java:458)
	at
org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.lambda$0(SQLQueryJob.java:402)
	at org.jkiss.dbeaver.model.DBUtils.tryExecuteRecover(DBUtils.java:1679)
	at
org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.executeSingleQuery(SQLQueryJob.java:400)
	at
org.jkiss.dbeaver.ui.editors.sql.execute.SQLQueryJob.extractData(SQLQueryJob.java:839)
	at
org.jkiss.dbeaver.ui.editors.sql.SQLEditor$QueryResultsContainer.readData(SQLEditor.java:2700)
	at
org.jkiss.dbeaver.ui.controls.resultset.ResultSetJobDataRead.lambda$0(ResultSetJobDataRead.java:102)
	at org.jkiss.dbeaver.model.DBUtils.tryExecuteRecover(DBUtils.java:1679)
	at
org.jkiss.dbeaver.ui.controls.resultset.ResultSetJobDataRead.run(ResultSetJobDataRead.java:100)
	at org.jkiss.dbeaver.model.runtime.AbstractJob.run(AbstractJob.java:102)
	at org.eclipse.core.internal.jobs.Worker.run(Worker.java:63)
Caused by: java.sql.SQLException: Invalid column name in KEYS clause of
MERGE - it may include only key and/or affinity columns: VALUATIONDATE
	at
org.apache.ignite.internal.jdbc.thin.JdbcThinConnection.sendRequest(JdbcThinConnection.java:750)
	at
org.apache.ignite.internal.jdbc.thin.JdbcThinStatement.execute0(JdbcThinStatement.java:212)
	at
org.apache.ignite.internal.jdbc.thin.JdbcThinStatement.execute(JdbcThinStatement.java:475)
	at
org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.execute(JDBCStatementImpl.java:345)
	at
org.jkiss.dbeaver.model.impl.jdbc.exec.JDBCStatementImpl.executeStatement(JDBCStatementImpl.java:138)
	... 11 more



--
Sent from: http://apache-ignite-users.70518.x6.nabble.com/

Mime
View raw message