Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi to all,
I have 2 tables ( A and B ). In the table A there is a date field "date1". In the table B there is another date field "date2".
I need, in the load script, to calculate an integer field that is the working days from date1 to date 2 or from date2 to date1,
I dont know which is the smallest date.
I tried to put an if
...
...
...
Table_B
Select
A,
B,
Date2
FROM Table_from_system
LOAD
If( Date1<Date2,NetWorkDays(Date1, Date2),'-' & NetWorkDays(Date2,Date1)) as Delay;
But clearly doesn't work because the system doesn't find the Date1 Field.
Thanks a lot
You first need to join (or concatenate) table A and B. Then you can use the joined table for your calculation since it will then contain both Date1 and Date2.
Unlikely I don't have common fields between this two tables. I can't join them.