Ik krijg de melding:
itgengpr045
Statement #64 ‘declare l_… end if;end;’ beginnend op regel 1.088 veroorzaakte een fout.
Kan rij ‘1703264’ niet vinden om deze onderliggende rij aan toe te voegen.
SQL statement:
declare
l_import_flag boolean := 'J' = 'J';
begin
if l_import_flag
then
dbms_output.put_line('Invoices being imported into Exact Online.');
use 4285382;
set use-http-disk-cache false;
set use-http-memory-cache false;
rollback;
begin transaction;
insert into ExactOnlineREST..SalesInvoices
( InvoiceTo
, InvoiceToContactPerson
, DeliverTo
, OrderedBy
, YourRef
, Description
, Currency
, InvoiceDate
, Journal
, Type
)
select sie.InvoiceTo
, sie.InvoiceToContactPerson
, sie.DeliverTo
, sie.OrderedBy
, sie.YourRef
, sie.Description
, sie.Currency
, sie.InvoiceDate
, sie.Journal
, sie.Type
from SalesInvoices@InMemoryStorage sie
identified
by sie.order_number
;
insert into ExactOnlineREST..SalesInvoiceLines
( StartTime
, EndTime
, Item
, Quantity
, Description
, UnitPrice
, AmountDC
, CostCenter
, CostUnit
)
select null StartTime
, null EndTime
, itm.Id
, ile.QUANTITY Quantity
, ile.DESCRIPTION Description
, ile.UNIT_PRICE UnitPrice
, ile.AMOUNT AmountDC
, ile.APT_CONSULTANT_CODE CostCenter
, null CostUnit
from csvcontents@inmemorystorage ile
left
outer
join ExactOnlineREST..Items itm
on itm.Code = ile.item_code
where ile.lvl = 1
order
by ile.order_number
, ile.lvl_sorting
attach
to ile.order_number
;
commit;
else
dbms_output.put_line('Invoices not imported into Exact Online.');
end if;
end;
Kunnen jullie mij hiermee helpen?