尝试从 SQL Server 存储过程加载数据,这适用于其他过程,但不想在这种情况下工作。
Load *;
Sql Exec [Report].[UspResults_SalesOrderKPI] @Company = '10' ,
@RedTagType = 'Q' ,
@RedTagUse = '' ;
我确定我错过了一些简单的东西,但我看不到它。
我将使用的最终代码如下所示。
RawSysOrders:
Load StockDescription As Product
,CustomerPoNumber As PO
,SalesOrder As PBL_Ref
,AcceptedDate
,ActualDeliveryDate As ActualShipDate
,Null() As Confirmation
,PlannedDeliverDate As ProposedShipDate
,Null() As RevisedShipDate1
,Null() As RevisedShipDate2
,Null() As RevisedShipDate3
,OrderQty As Qty
,StockCode As Code
,Null() As Volume
,Job As Batch
,CustomerName As DeliveredTo
,CustomerName As SoldTo
,Null() As PaymentTerms
,ApplyMap('Map_SOPrices',SalesOrder&'_'&SalesOrderLine,0) As GBP
,0 As USD
,0 As Euro
,1 As USDRate
,1 As EuroRate
,0 As ShippingCost
,If(ActualDeliveryDate<=PlannedDeliverDate,'Yes','No') As ShipDateMet
,DaysDiff As DaysOVer
,DispatchComments As NotesProblems
,Year(EntrySystemDate) as File;
where Year(EntrySystemDate)>=2016;
Sql Exec [BlackBox].[Report].[UspResults_SalesOrderKPI] @Company = '10' ,
@RedTagType = 'Q' ,
@RedTagUse = 'Qlik Sense > Product KPIs';