Viewing 15 posts - 931 through 945 (of 3,011 total)
Just divide the hour by the number of hours you want to group by.
Examples:
select
Group3Hours = datepart(hh,a.DateofCall)/3,
Group4Hours = datepart(hh,a.DateofCall)/4,
a.DateofCall
from
( -- Test Data
select
DateofCall = dateadd(hh,a2.H,a1.DT)
from
(select DT = getdate()) a1
cross join
(
select H =...
March 30, 2011 at 9:19 am
"Build 2600 Service Pack 3" is for the Windows version, not the SQL Server version.
You can verify this by starting Notepad, selecting the Help menu, and selecting About Notepad.
March 29, 2011 at 10:36 am
Start by looking at the execution plan to see exactly what it is doing.
However, it is likely that it is pulling back too much data, so consider doing a call...
March 23, 2011 at 2:44 pm
anton.marais (3/22/2011)
To...
March 22, 2011 at 1:38 pm
You forgot to include "This is the stupidist question ever" under the possible answers.
March 22, 2011 at 12:07 pm
declare
@StartDate datetime= '2011-11-17 13:17:14.000' ,
@StartTime datetime = '1899-12-30 14:34:47.993'
select
DatePlusTime =
-- Date as of midnight
dateadd(dd,datediff(dd,0,@StartDate),0)+
-- Time as offset from 1900-01-01 00:00:00.000
@StartTime-dateadd(dd,datediff(dd,0,@StartTime),0)
DatePlusTime
------------------------
2011-11-17 14:34:47.993
March 21, 2011 at 10:18 am
RichB (3/21/2011)
I run fusionIO SSDs - pcie cards. Stripe them together, mirror the databases.Absolutely amazing performance.
What size/model are you using? How much did they cost?
March 21, 2011 at 8:41 am
kent.kester (3/4/2011)
Just recently I had a question from someone in HR: "Let's say, hypothetically, that you are giving a presentation to the executives. One of them stops you...
March 17, 2011 at 10:21 am
The date settings are connection specific, not server or workstation specific, so you have to check them at run time to see the difference.
These are the relevant settings when you...
March 17, 2011 at 10:00 am
mtillman-921105 (3/16/2011)
March 16, 2011 at 9:44 pm
Watch how you handle that Pi!
Converting Pi to binary: Don't do it!
http://everything2.com/title/Converting+Pi+to+binary%253A+Don%2527t+do+it%2521
March 15, 2011 at 9:48 am
Yes, I've seen those numbers.
What I haven't seen is pricing. If I could make the case that a pair of SSD drives mirrored could give me the same performance...
March 14, 2011 at 10:03 pm
I was looking at the following from Hitachi Global Storage Technologies, but I don't think they are widely available yet. Seems to be the general problem for enterprise SSDs;...
March 13, 2011 at 12:30 am
select
*
from
MyTable
where
-- Datetime greater than or equal to start of current hour
MyDatetime >= dateadd(hh,datediff(hh,0,getdate()),0)and
-- Datetime less than start of next hour
MyDatetime < dateadd(hh,datediff(hh,0,getdate())+1,0)
March 11, 2011 at 9:48 pm
The "AL-" prefix seems like a complete waste. It's the same on every row, so it contains no infomation. If you need it for display purposes, just add...
March 11, 2011 at 9:34 pm
Viewing 15 posts - 931 through 945 (of 3,011 total)