Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All,
I have to create an filter in the back end script where i want data as per the today and 100 days back data..
I have a date column as DATE([Main Date]) as [Main Date]..
What should i have to do...?
Basic logic is like:
Load
[Main Date]
From <> Where [Main Date]>=Today()-100;
Now you have to take care of the format of the data so that comparison under where clause could be made to filter.
You can try some thing like..
load * ,
Date(MinDate) as MinDate
from yourSource
where Date(MinDate) >= Date(Today()) -100
or..
load * ,
Date(MinDate) as MinDate
from yourSource
where num(MinDate) >= num(Today()) -100
Is it possible to use 'If condition' between the table ...if yes please tell me the syntax..
Rahul Yadav wrote:
Is it possible to use 'If condition' between the table ...if yes please tell me the syntax..
I could not understand your 'between the table'. Could you explain a bit more?
Means
Load *,
If(maindate=Today() and Today() - '100',maindate,Null()) as maindate,
From Sourcedata;
can I use this..?
Yes, may be more accurately like:
Load *,
If(maindate>=Today() - 100,maindate,Null()) as maindate
From Sourcedata;