Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have started creating an application but have been asked to limit the records to only data from the last 7 days (which will then automatically update everyday), does anyone know how to do this ?
Did you want an incremental update or the application should always only have last 7 days? Assuming, it is the later and your DB Oracle, you could put the following in your SQL statement:
SQL select * from yourtable where yourdatecolumn >= trunc(sysdate) -7
Regards,
Dinesh.
incremental would be the best for this situation
Hello,
there are more then one possibilitie to reduce data. One is to do it in an expression of a chart using SET analysis similar to this
=sum( {<MyDateField= {"<=$(=data(today()-7))}">} Value)
This has to done then in every chart-expression you want to reduce the data to the last seven days.
Another possibilty is to reduce data during the load. Advantage is you need not to program it in every expression but only once in the script. Disadvantage is: what if someone needs to compare actual data with previous week, last month, prev. year .....
HtH
Roland
wot statement wud I use in the load
thanks by the way
Hi,
something like
Load .... From .... Where MyDateField <= date(today()-7);
Note: Take care of the correct matching between the date-formats.
RR
Load A,
B,
C,
Date
From abc
where Date >=Date(today()-7);
Upps,
Thx Sharma, you are right with ">=".
RR