Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Can anyone see anything wrong with the SQL below. I keep getting the error message that the field "Dummy_Division" does not exist and I cannot see what I am doing wrong
DummyDivisionMap:
MAPPING LOAD
Product_Number,
Dummy_Division
RESIDENT Products_All_Codes;
Transactional:
LOAD
//Act_or_Est,
//Period,
Despatch_RDC,
date(Invoice_Date,'DD/MM/YYYY') as Invoice_Date,
Invoice_Number,
Customer_Number,
Account_Number,
Despatch_Note_Number,
//Order_Number,
Product_Number,
Delivery_Type,
Credit_Note_Code,
Units,
Volume,
Lines,
Sales_Value,
Gross_Contribution,
Customer_Retro,
Post_Retro_Margin,
Storage_Cost,
Preparation_Cost,
Transport_Cost,
Logistical_Cost,
Logistics_Sales_Recovery,
Net_Logistical_Cost,
Vendor_Retro,
Operating_Profit,
[EOS/NEOS],
Table_ID,
Price_Indicator,
Std_Sales,
BackOrder,
//EU_Category,
Delivery_Post_Code,
Delivery_Outer_Post_Code,
Delivery_Postal_Area_Code,
Composite,
Component_Units,
End_Consumer,
Promotion_Code,
Promotion_Cost_Price,
Selling_Day_Number,
ApplyMap ('DummyDivisionMap',Dummy_Division,'MISSING') as Division,
Invoice_Type
//Data_LastUploaded,
//Data_LastUploaded_By
FROM [$(zFileMask)] (qvd);
Hi,
Is there a field in Dummy_Division in [$(zFileMask)] (qvd);
Check once..Hope it helps
Hi
Yes field exists.
The table "DummyDivisionMap" Loads correctly I get the error when the second table loads
Hi,
Did u Check the fieldname Dummy_Division available in second table??
Yes all checked
Hi,
Can you post a sample file? That helps to find the mistake..If possible , send the xls file or qvd file too??
Hi
I think logic is wrong. check it?
You should use ApplyMap ('DummyDivisionMap',Product_Number,'MISSING') as Division,
Syntax
applymap('mapname', expr [ , defaultexpr ] )
As per your mapping load the expr maps the product number field and the gets the corresponding Dummy_Division field value.
I think Dummy_Division is not a Field in the Transactional table
Hi
You are correct Dummy_Division is not in the Transaction table, but that is what I am trying to do
many thanks
Hi,
Did you chk with this
ApplyMap ('DummyDivisionMap',Product_Number,'MISSING') as Division