Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
[Table2]:
LOAD
event_id,
event_name;
SELECT *
FROM Source2
WHERE "event_date" >= '$(vYearStartDate)' AND
"event_name" LIKE '%year2023%';
NoConcatenate
[Table1]:
LOAD
event_date,
event_id
WHERE EXISTS(event_id) ;
SELECT *
FROM SOURCE1
WHERE "event_date" >= '$(vYearStartDate)';
Drop Table Table2;
EXIT SCRIPT;
I could get the common records however I would like to have event_name field from Table 2 as well in Table 1. Please help.
You could join these tables using left join, Script below..
[Table2]:
LOAD
event_id,
event_name;
SELECT *
FROM Source2
WHERE "event_date" >= '$(vYearStartDate)' AND
"event_name" LIKE '%year2023%';
Left Join(Table2)
LOAD
event_date,
event_id ;
SELECT *
FROM SOURCE1 WHERE "event_date" >= '$(vYearStartDate)';
EXIT SCRIPT;
You could join these tables using left join, Script below..
[Table2]:
LOAD
event_id,
event_name;
SELECT *
FROM Source2
WHERE "event_date" >= '$(vYearStartDate)' AND
"event_name" LIKE '%year2023%';
Left Join(Table2)
LOAD
event_date,
event_id ;
SELECT *
FROM SOURCE1 WHERE "event_date" >= '$(vYearStartDate)';
EXIT SCRIPT;
[Table2]:
LOAD
event_id,
event_name;
SELECT *
FROM Source2
WHERE "event_date" >= '$(vYearStartDate)' AND
"event_name" LIKE '%year2023%';
NoConcatenate
[Table1]:
LOAD
event_date,
event_id
WHERE EXISTS(event_id) ;
SELECT *
FROM SOURCE1
WHERE "event_date" >= '$(vYearStartDate)';
NoConcatenate
Final_Data:
LOAD event_date, event_id RESIDENT [Table1];
LEFT JOIN(Final_Data)
LOAD event_name RESIDENT Table2;
Drop Table Table2, Table1;
EXIT SCRIPT;