De volgende query haalt per artikel de voorraden op via Invantive Bridge Online.
Echter, de twee to_char
geven een datum terug in plaats van een tekst:
select 'Voorraad'
Category
label 'Categorie'
, whe.Code
Opslaglocatie
label 'Opslaglocatie'
, null
SupplierName
label 'Leverancier'
--
, trunc(sysdateutc) StockDate
, to_char(trunc(sysdateutc), 'YYYY-IW') StockWeek
, to_char(trunc(sysdateutc), 'YYYY-MM') stockMonth
--
, round(spn.CurrentStock, 0)
CurrentStock
label 'Voorraad (m)'
from [StockPositionsIncremental@eol]@InvantiveBridgeOnline spn
join ExactOnlineREST.Inventory.[Warehouses@eol]@InvantiveBridgeOnline whe
on whe.ID = spn.Warehouse
where spn.Division = 123123
and spn.CurrentStock != 0
De uitvoer is dan:
04/08/2022 00:00:00 +00:00
Dit formaat is sowieso zichtbaar in Query Tool, maar ook bij Export naar Excel: