Hi All,
I am creating ODBC connection and want to insert record in table from one DB to another.
I am using following job for this.
Statement statement;
str query, criteria;
LoginProperty loginProperty;
OdbcConnection odbcConnection;
loginProperty = new LoginProperty();
loginProperty.setDSN('AX_ETL');
odbcConnection = new OdbcConnection(loginProperty);
statement = odbcConnection.createStatement();
query = "INSERT into Target.dbo.Test (EXECUTIONID) select ExecutionId from Source.Budget where TransactionCurrencyAmount = 300";//
new SqlStatementExecutePermission(query).assert();
statement.executeUpdate(query);
CodeAccessPermission::revertAssert();
Above query will return more than one record.
where Target database is AX database and Source database is another DB in same SQL Server.
When I run this job I am getting error
![]()
*This post is locked for comments
I have the same question (0)