We are using Invantive Data Hub 24.0.324-PROD+4923 to copy a Autotask UDF table to our on premises SQL Server, but get this error:
Error itgencun013:
error itgenase094:
The table can not be created.
Maintenance of the table ‘WH_CONTRACT_UDF’ failed.
Incorrect syntax near ‘-’.Incorrect syntax near ‘-’.
Call stack:
System.Data.SqlClient.SqlException
ValidationException
ValidationException
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, Boolean sendToPipe, Int32 timeout, Boolean asyncWrite, String methodName)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Invantive.Data.AnsiSqlProviderBase.C.A(Connection)
at Invantive.Data.AnsiSqlProviderBase.ExecuteWithRetry[T](GlobalState owner, ExecutionOptions executionOptions, SqlExecutionStep sqlExecutionStep, Connection connection, ConnectionContext context, Func`2 action, Int32 maxAttempts, Int64 sleepOnRetryMs, String originMethod, Int32 originLineNumber)
at Invantive.Data.AnsiSqlProviderBase.PassthroughSqlAction(GlobalState owner, ExecutionOptions executionOptions, SqlExecutionStep sqlExecutionStep, String actionSql, ParameterList parameters, String loggingTableName)
at Invantive.Data.Providers.SqlServer.SqlServerProvider.EnsureTableExists(GlobalState owner, ExecutionOptions executionOptions, SqlExecutionStep sqlExecutionStep, String nonStandardizedPartitionCode, TableSpecification tableSpecification, Int32 preferredSqlDdlPerBatch)
I think the first time the table is created we need to do it in some special way.