Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi,
i have one logic
if(isnull(DateSubmitted),DateDueGracePeriod,DateSubmitted ) as DateNew,
DateDueGracePeriod= these include the dates till year 2020, but i want to restrict it at backend .
i want in DateDueGracePeriod always there would be dates less than today, shud not exceed 16 dec 2015..
how i can do this?
if(isnull(DateSubmitted),Date(RangeMin(DateDueGracePeriod,Today())),DateSubmitted ) as DateNew,
When you say restrict in the backend, I presume you mean in the Load Script?
In the case I think you want something like
LOAD *
FROM [yourSource.QVD]
WHERE DateDueGracePeriod <= Today;
There are other ways you could go about this, but hopefully this will get you started.
May be something like this:
LOAD YourFields,
If(IsNull(DateSubmitted), DateDueGracePeriod, DateSubmitted) as DateNew,
FROM Source
Where not IsNull(DateSubmitted) or Num(DateDueGracePeriod) <= Num(Today());