Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All,
I just want to add a where clause to my load script and I want to load all the data till the last day of the previous month.
Test:
Load
ID1,
amount,
Company_Code,
Document_Year,
DATE1,
Date(DATE) as Date
resident Entry
;
Thanks,
Rima
where DATE <= MonthEnd(today(1),-1);
where DATE <= MonthEnd(today(1),-1);
Try this
Test:
Load
ID1,
amount,
Company_Code,
Document_Year,
DATE1,
Date(DATE) as Date
resident Entry
DATE <= MonthEnd(today(),-1)
;
Hi Rima,
Could you please try this one:
.
.
resident Entry Where DATE < = monthEnd(Today(),-1);
Thanks,
Arvind Patil
Thanks Robin for your answer,
I just want to add group by clause for the above expression
Test:
Load
ID1,
sum(amount) as Amount1,
Company_Code,
Document_Year,
DATE1
resident Entry
WHERE DATE1 <= MonthEnd(today(1),-1)
GROUP by ID1,Company_Code,Document_Year
;
but the result was "invalid expression " what am I missing?
Thanks,
Rima
Your Group By clause is missing DATE1
group by must contain every field / expression that won't be aggregated