Select statement using last month's summary
2003-03-10 10:48:01
The following select was pulled from this list;
/* */
select case when SUM(BYTES) IS NOT NULL then CAST(SUM(BYTES) AS -
DEC(40,2))/(1024*1024*1024) else ABS(CAST((0) AS -
DEC(40,2))) end AS "Total Gigabytes" from summary -
where DAY(end_time) = DAY(CURRENT DATE)-1 -
and MONTH(end_time)=MONTH(CURRENT DATE) -
and YEAR(end_time)=YEAR(CURRENT DATE)
If I wanted to get this same information, but for last month, does anyone
how I could do this?
I tried a few variations but could not get it to work. Any ideas?
Shannon Bach
e-mail sbach AT mge DOT com
|
<Prev in Thread] |
Current Thread |
[Next in Thread>
|
- Select statement using last month's summary,
Shannon Bach <=
|
|
|