Viewing 3 posts - 1 through 3 (of 3 total)
Try the following:
select *
from crudefilo c1
where c1.dt >= DateAdd(day, -30, GetDate())
and c1.dt = (select min(c2.dt)
from crudefilo cw
where datepart(d,c2.dt) = datepart(d,c1.dt)
and datepart(m,c2.dt) = datepart(m,c1.dt)
order by c1.dt
November 23, 2004 at 5:57 pm
The problem with using the dynamic sql methods to number your rows is that the query will take a long time on large tables. Niether will you get unique row...
October 29, 2003 at 11:26 am
Antares:
Thanks for taking the time to respond to this posting. As you advised, we decided to give dbo ownership of all objects in our development environment.
To solve our problem,...
October 3, 2003 at 11:29 am
Viewing 3 posts - 1 through 3 (of 3 total)