Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello All,
i need to extra only current fiscal year data, what i mean is ,i got a field called FISCYEAR (which was in string i converted it in to numeric by using Num# function Num#(FISCYEAR) as FISCYEAR )) from source,which has values like
FISCYEAR
2018
2017
2016
now i need to write a conditon while extracting such that if (FISCYEAR = todays fiscal year then extract else show null values)
for example if i do a reload on 31/03/2018 then i need to get FISCYEAR=2018 data ony and then
if i reload on 01/04/2018 then i need to get FISCYEAR=2019 data only ,if data is present then extract data else show null values
i tried this where FISCYEAR=year(date(today()));
but it is throwing error
Any suggestion plz
try like:
Where FISCYEAR=year(AddMonths(today(),4));
Hi Naveen,
I would suggest you create a variable that calculates current fiscal year based on today's date (as below).
if (Month(Today()) >4, Year(Today())+1, Year(Today()));
Then use this variable in your load statement's where clause.
Good luck,
Sneha