Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi All,
I have a Month/Year field in a Fact QVD (I have multiple Transnational Fields as well), where I have last 18 Months (Jan - 15, Dec - 14, Nov - 14, Oct - 14...... Aug - 13). Now while Loading into Script, I want to fetch only last 12 months.
What would be the logic to write in Load Script?
You should be able to adapt this to your needs :
Where monthstart([YourMonthYear]) >= monthstart(addmonths(today(),-12))
Hi,
Provide the sample file and did you have single fields as Month or year.
Regards,
Anand
Hi Bill,
Thank you very much. Am checking it now.
But one query please-
Will this condition monthstart(addmonths(today(),-12)) ignore the Current Month? (I don't need Feb - 15, need Jan - 15 and backwards).
Hi Anand,
The field is like this below. I need last 12 months from this: Jan-15 and backwards.
Hi,
Then in the load script write this script
LOAD
MonthYear
FROM Source;
Where MonthYear >= (Addmonths(Today(),-13));
Regards
Anand
Where monthstart([YourMonthYear]) >= monthstart(addmonths(today(),-13))
and monthstart([YourMonthYear]) <= monthend(addmonths(today(),-1))
Hi,
try:
Load *
from DataQVD.qvd(qvd)
where Date >= AddMonths(Monthend(today()),-13) and Date < Monthstart(today())
Regards
Neetha