Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I need to create a composite key for these 2 tables. After loaded in the Sales Target Data. i got a synthetic key.
When i tried to create a composite key in my orders table - EmployeeID & '|' & Month & '|' & Year as Order_key, i got error as such.
How to create a composite for both of these table?
Orders:
LOAD OrderID,
Month(OrderDate) as Month,
Day(OrderDate) as Day,
OrderDate,
EmployeeID,
CustomerID,
ProductID,
APPLYMAP('Product_Details',ProductID,null()) as Product_Made,
ShipperID,
Year,
Sales,
Cost,
Quantity
FROM
[Data Source\Order.xlsx]
(ooxml, embedded labels, table is Order);
Sales_Target:
LOAD
EmployeeID,
Year,
Month,
Target
FROM
[Data Source\Sales_Target.xlsx]
(ooxml, embedded labels, table is Sheet1);
Rgds
Jim
Try:
EmployeeID & '|' & Month(OrderDate) & '|' & Year
make sure that both Month fields are in the same format.
Try:
EmployeeID & '|' & Month(OrderDate) & '|' & Year
make sure that both Month fields are in the same format.
The orderdate is orders table is dd/mm/yyyy(13/01/2016) and month is sale target table is "Jan".
is it same date format?
Should be fine.
Create Listbox in front end with value 'Month' to check if all entries are in the same format.