Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Please see attached for example.
I have two tables
FirstDate & EndDate. I would like to join the two table, then create an indicator based of StartDate and EndDate differences. See attached. What I have is not working. Can someone help?
StartDate:
LOAD ID,
StartDate
FROM
ExampleData.xlsx
(ooxml, embedded labels, table is StartDateData);
EndDate:
LOAD ID,
EndDATE
FROM
ExampleData.xlsx
(ooxml, embedded labels, table is EndDateData);
JOIN (EndDate)
LOAD *
Resident StartDate ;
DROP TABLE StartDate;
Indicator:
LOAD
IF(StartDate - EndDATE <= 15, 'Y', 'N') AS Gap_Indicator,
//IF(EndDATE - StartDate >= 15, 'N', 'Y') AS Gap_Indicator2,
//IF(StartDate - EndDATE >= 5, 'N', 'Y') AS Gap_Indicator3,
//IF(StartDate - EndDATE <= 5, 'N', 'Y') AS Gap_Indicator4,
ID, StartDate, EndDATE
RESIDENT EndDate;
DROP TABLE EndDate
You might want to do EndDate - StartDate instead of the other way around
IF(EndDATE - StartDate <= 15, 'Y', 'N') AS Gap_Indicator,
You might want to do EndDate - StartDate instead of the other way around
IF(EndDATE - StartDate <= 15, 'Y', 'N') AS Gap_Indicator,
Hi,
What's not working, the gap indicator? If so, try
IF(EndDATE - StartDate <= 15, 'Y', 'N') As Gap_Indicator
Hope this helps.