Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have the following code:
Order:
%ID,
Product,
Quantity,
DateOrder,
DateBooking
FROM ..
OrderCalendar:
LOAD
num([DateOrder]) as [%DateOrder],
Year([DateOrder) AS Year.DateOrder,
RESIDENT Order;
BookingCalendar:
num([DateBooking]) as [%DateBooking],
Year([DateBooking) AS Year.DateBooking,
RESIDENT Order;
Now, I would like to add a table that specifiy the DateTyp (Type = Order or Booking).
How can I do this?
create static flag for DateType
like
OrderCalendar:
LOAD
num([DateOrder]) as [%DateOrder],
Year([DateOrder) AS Year.DateOrder,
'Order' as DateType
RESIDENT Order;
BookingCalendar:
num([DateBooking]) as [%DateBooking],
Year([DateBooking) AS Year.DateBooking,
'Booking' as DateType
RESIDENT Order;
@ym as @PrashantSangle mentioned you can create the static flag and if required you can concatenate both the tables:
OrderCalendar:
LOAD
num([DateOrder]) as [%DateOrder],
Year([DateOrder) AS Year.DateOrder,
'Order' as DateType
RESIDENT Order;
Concatenate(OrderCalendar)
BookingCalendar:
num([DateBooking]) as [%DateBooking],
Year([DateBooking) AS Year.DateBooking,
'Booking' as DateType
RESIDENT Order;
@sidhiq91 This gives a synthetic key. (DateOrder/DateBooking). How can I solve this?
@ym I dont see any common fields between the tables. Could you please provide screen shot of the Synthetic table and keys?
The problem is that in my Order Table I have also
%DateOrder and %DateBooking.