Viewing 9 posts - 1 through 9 (of 9 total)
Interesting... now i've deleted old data and inserted again with the same date values as the previous deleted and now it works fine. Really dont now why is that happening.
Now...
February 17, 2011 at 4:36 pm
Craig Farrell (2/17/2011)
There's no other reasons that...
February 17, 2011 at 4:24 pm
Craig Farrell (2/17/2011)
IF OBJECT_ID('tempdb..#MyData') IS NOT NULL
DROP TABLE #MyData
CREATE TABLE #MyData
([Date]...
February 17, 2011 at 4:03 pm
Craig Farrell (2/17/2011)
I have my own data, first record was inserted 02/07/2011 11:44:11 PM
Then please post your actual SQL, as I requested, and we might be able to help.[/quote]
select *...
February 17, 2011 at 3:31 pm
Craig Farrell (2/17/2011)
If you're using my sample data/build, there's no records in the last 14 days then there was in the last hour, so that's correct.
If you're using your real...
February 17, 2011 at 3:07 pm
Craig Farrell (2/17/2011)
Weeks work by weeknumber based off the calendar days, it's not a straight 14 day count. Instead of wk, -2, try using dd, -14.
Yes, I try to...
February 17, 2011 at 2:19 pm
Thank you Craig, it works when i use:
select * from #cdata where cDate >= DATEADD( hour, -1, getdate())
...
February 17, 2011 at 1:53 pm
CREATE TABLE dbo.cData (
ID bigint NOT NULL IDENTITY(1, 1),
[Value] float,
[Date] datetime
)
in Date field i...
February 16, 2011 at 4:27 pm
Andreas Goldman (2/16/2011)
WHERE [DATE] >= DATEADD(HOUR, - 1, GETDATE())
hm... this query gets all data from table. My last record was inserted 08/02/2011 11:44:56 PM so
it must return zero rows because...
February 16, 2011 at 4:01 pm
Viewing 9 posts - 1 through 9 (of 9 total)