Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I want have create a fieldname (Date for example) which is resulting in the sum of items sold in 24 hours.
I use the below mentioned script to create a calender with hours .Sales should be registered per hour.
Temp_Data:
Load
date((($(#vMinDate) * 24) +(Iterno()-1))/24, 'DD-MM-YYYY hh:mm') as DateTime
Autogenerate(1)
While
($(#vMinDate) * 24) +(Iterno()-1) <= $(#vMaxDate) * 24;
Calender:
LOAD
DatumTime,
Year(DatumTijd) as Year,
Month(DatumTijd) as Month,
???? as Date , What is the syntax for an aggregrated total for a day. So the sum over the 24 hous in a day?
Two things:
I noticed that you are performing a left join to your OPNAME_OPNMUT table using the same resident table, apparantly just to add some fields based on some other field values.
This table is also pretty large, right? A join will (temporarily) need huge amount of memory, so it should be avoided on large tables unless really needed. I would assume that you can create your new fields also in a resident load of your OPNAME_OPNMUT table.
Second, you assign 17:00 to night shift, I think that's a bit early
If first issue is not your issue, where does your script stop? What table is being loaded then?
Great Work Stafan,
with some left joins and some dropping tables it works fine and very fast
THANKS