Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi all, got a problem with an interval match I'm trying to use, it looks like this:
LOAD Fiscal_Year,
Period,
Period_Start,
Period_End
FROM
PeriodCalendar.qvd
(qvd);
LOAD "incident_id",
"date_logged";
SQL SELECT "incident_id",
"date_logged"
FROM AssystLiveBS.dbo.incident;
IntervalMatch (date("date_logged"),'dd/mm/yyyy') select Period_Start, Period_End from PeriodCalendar.qvd (qvd);
However it doesnt function, any ideas why?
All help very gratefully received!
According to the help, the syntax is intervalmatch (field), so try changing the date format of date_logged in the load statement and not in the intervalmatch function. The intervalmatch function should be just
intervalmatch(date_logged) load Period_Start, Period_End from PeriodCalendar.qvd (qvd);
Regards.
Hi Ben,
I'd try as follows
RangesTable:LOAD Fiscal_Year, Period, Date(Period_Start, 'DD/MM/YYYY') AS Period_Start, Date(Period_End, 'DD/MM/YYYY') AS Period_EndFROM PeriodCalendar.qvd (qvd); FactsTable:LOAD "incident_id", Date("date_logged", 'DD/MM/YYYY') AS Date;SQL SELECT "incident_id", "date_logged"FROM AssystLiveBS.dbo.incident; FactsAndRanges:INTERVALMATCH (Date) LEFT JOIN LOAD Period_Start, Period_EndRESIDENT DatesTable;LEFT JOIN (FactsTable) LOAD * RESIDENT RangesTable; DROP TABLE RangesTable;
Hope that helps!
Everything looks good except this strange conversion
IntervalMatch (date("date_logged"),'dd/mm/yyyy')
Because of the syntax error the whole sentence is just ignored by loader. And it will be better to make this conversion in initial data load statement, like this:
LOAD Fiscal_Year,
Period,
Period_Start,
Period_End
FROM
PeriodCalendar.qvd
(qvd);
LOAD "incident_id",
date("date_logged",'dd/mm/yyyy') as date_logged;
SQL SELECT "incident_id",
"date_logged"
FROM AssystLiveBS.dbo.incident;
IntervalMatch ("date_logged") select Period_Start, Period_End from PeriodCalendar.qvd (qvd);