De callstack geeft aan dat gaat om CreateTable
(SQL: create table
):
ValidationException
at Invantive.Basics.ValidationException..ctor(GlobalState owner, ExecutionOptions executionOptions, String messageCode, String errorMessage, String kindRequest, String localStackTrace, String nk, Exception innerException, Boolean inheritMessageCodeWhenPresent, Nullable`1 uid, Nullable`1 isRecoverable, String poolIdentityId, String url, Nullable`1 partyUid, String partitionCode, String tableName, String parameter1, String parameter2, String parameter3, String parameter4, String parameter5, String clientId)
at Invantive.Data.SqlUtility.CheckRow(GlobalState owner, ExecutionOptions executionOptions, SqlExecutionStep sqlExecutionStep, IProviderManager manager, ISparseArray row, IColumnDefinitionCollection fields, Nullable`1 rowNumberContext, ObjectDefinition objectDefinition, String sqlStatement, Boolean isFromDml, String operationType, String fullTableNameOverrule, Rst004Mode rst004Mode, Boolean disableRst007, Boolean disableRst009, Boolean disableRst011AndOrRst013, Boolean disableRst046, Boolean disableRst054)
at Invantive.Data.SqlUtility.CheckRows(GlobalState owner, ExecutionOptions executionOptions, SqlExecutionStep sqlExecutionStep, IProviderManager manager, ResultSet resultSet, ObjectDefinition objectDefinition, String sqlStatement, Boolean isFromDml, String operationType, String fullTableNameOverrule, Rst004Mode rst004Mode, Boolean disableRst007, Boolean disableRst009, Boolean disableRst011)
at Invantive.Sql.V1.DdlStatementTree.CreateTable(GlobalState owner, ExecutionOptions executionOptions, SqlExecutionStep sqlExecutionStep, IQueryStatePerExecution queryStatePerExecution, SparseArrayPool sparseArrayPool, FirehoseResultSet results, IDdlProvider ddlProvider, Int64 rowsAffectedStatement, ISparseArray pSqlVariableRow, SqlColumnDefinitionCollection oldNewTriggerFields, ISparseArray oldTriggerRow, ISparseArray newTriggerRow, SqlColumnDefinitionCollection sourceTriggerFields, ISparseArray sourceTriggerRow, Nullable`1 maxBatchSizeRows)+MoveNext()
at Invantive.Data.CompressedEnumerable`1.GetEnumerator()+MoveNext()
at Invantive.Sql.V1.FirehoseResultSet.Iterator(GlobalState owner, ExecutionOptions executionOptions, IQueryStatePerExecution queryStatePerExecution, SparseArrayPool sparseArrayPool, SqlExecutionStep parentStep, ISparseArray outerRow, ISparseArray pSqlVariableRow, SqlColumnDefinitionCollection oldNewTriggerFields, ISparseArray oldTriggerRow, ISparseArray newTriggerRow, SqlColumnDefinitionCollection sourceTriggerFields, ISparseArray sourceTriggerRow)+MoveNext()
at Invantive.Sql.V1.QueryPlan.A(GlobalState owner, ExecutionOptions, SqlExecutionStep, SparseArrayPool, IEnumerable`1 data, String)+MoveNext()
at Invantive.Data.ExtensionMethods.IteratorWithFinally`1.IteratorWithFinallyEnumerator.MoveNext()
at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
at Invantive.Sql.V1.PSqlParser.ExecuteQueryTree(GlobalState owner, ExecutionOptions executionOptions, SqlExecutionStep sqlExecutionStep, IQueryStatePerExecution queryStatePerExecution, PSqlScope scope, SqlStatementContext ctx, ISparseArray variablesRow, SqlColumnDefinitionCollection oldNewTriggerFields, ISparseArray oldTriggerRow, ISparseArray newTriggerRow, SqlColumnDefinitionCollection sourceTriggerFields, ISparseArray sourceTriggerRow, DatabaseColumn[] intoVariables, ParameterList globalParameters, V queryPlanState)
at LambaExecutePSqlTree(Closure, GlobalState, ExecutionOptions, SqlExecutionStep, IQueryStatePerExecution, ISparseArray, ISparseArray, SqlColumnDefinitionCollection, ISparseArray, ISparseArray, SqlColumnDefinitionCollection, ISparseArray)
at Invantive.Sql.V1.PSqlStatementTree.Fetch(GlobalState owner, ExecutionOptions executionOptions, SqlExecutionStep sqlExecutionStep, IQueryStatePerExecution queryStatePerExecution, ISparseArray pSqlVariableRow, SqlColumnDefinitionCollection oldNewTriggerFields, ISparseArray oldTriggerRow, ISparseArray newTriggerRow, SqlColumnDefinitionCollection sourceTriggerFields, ISparseArray sourceTriggerRow)+MoveNext()
Het gaat om de tabel met naam rpt
met de volgende definitie:
create or replace table rpt@InMemoryStorage
as
select /*+ result_set_name('Transactions') */
por.ordernumber
, por.yourref
, por.orderdate
reference_date
, act.code
label 'Relatiecode'
, act.name
label 'Relatienaam'
, itm.code itemcode
label 'SKU'
, itm.description itemdescription label 'Artikelomschrijving'
, igp.Code itemgroupcode label 'Artikelgroep'
, ple.quantity
, itm.netweight * ple.quantity
netweight_in
label 'Gewicht IN'
, cast(null as decimal(38,6))
netweight_uit
label 'Gewicht UIT'
, ple.netprice
, case
when itm.netweight = 0
then null
else ple.netprice / itm.netweight
end
price_per_weight_unit
label 'Prijs/gram'
, cast(ple.amountdc as decimal(38,6)) as PurchaseAmount
label 'Aankoopbedrag'
, cast(null as decimal(38,6)) as SalesAmount
label 'Verkoopbedrag'
from PurchaseOrderLinesIncremental@eol por
join PurchaseOrderLinesIncremental@eol ple
on ple.division = por.division
and ple.purchaseorderid = por.purchaseorderid
and ple.LineNumber != 0
join ItemsIncremental@eol itm
on itm.division = ple.division
and itm.id = ple.item
join ExactOnlineREST..ItemGroups@eol igp
on igp.division = itm.division
and igp.Id = itm.ItemGroup
join AccountsIncremental@eol act
on act.division = por.division
and act.id = por.supplier
where por.LineNumber = 0
union all
select sor.ordernumber
, sor.yourref
, sor.orderdate
reference_date
, act.code
, act.name
, itm.code itemcode
label 'SKU'
, itm.description itemdescription label 'Artikelomschrijving'
, igp.Code itemgroupcode label 'Artikelgroep'
, sle.quantity
, cast(null as decimal(38,6))
netweight_in
label 'Gewicht IN'
, itm.netweight * sle.quantity
netweight_uit
label 'Gewicht UIT'
, sle.netprice
, case
when itm.netweight = 0
then null
else sle.netprice / itm.netweight
end
price_per_weight_unit
label 'Prijs/gram'
, cast(null as decimal(38,6)) as PurchaseAmount
label 'Aankoopbedrag'
, cast(-sle.amountdc as decimal(38,6)) as SalesAmount
label 'Verkoopbedrag'
from SalesOrdersV2Incremental@eol sor
join SalesOrderLinesV2Incremental@eol sle
on sle.division = sor.division
and sle.orderid = sor.orderid
join ItemsIncremental@eol itm
on itm.division = sle.division
and itm.id = sle.item
join ExactOnlineREST..ItemGroups@eol igp
on igp.division = itm.division
and igp.Id = itm.ItemGroup
join AccountsIncremental@eol act
on act.id = sor.invoiceto
order
by reference_date
, ordernumber