Forum Replies Created

Viewing 15 posts - 931 through 945 (of 3,011 total)

  • RE: 2 Hourly Report?

    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 =...

  • RE: Installed sp4 to SQL Server Express 2005 but @@version shows Build 2600 Server Pack 3.

    "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.

  • RE: Developer making me look ignorant

    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...

  • RE: DateDiff with Months datepart - ILLOGICAL

    anton.marais (3/22/2011)


    Thanks Dave, but the same behaviour also applies to the DateDiff function in Microsoft Visual Studio (VB.NET, C#, VB6), so this seems to be a Microsoft decision and definition.

    To...

  • RE: plz provide the correct answer

    You forgot to include "This is the stupidist question ever" under the possible answers.

  • RE: Rounding issue converting float to datetime

    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

  • RE: Server Class SSD SAS Disks

    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?

  • RE: The Oddest Interview Questions

    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...

  • RE: ISDATE difference from client and server

    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...

  • RE: Server Class SSD SAS Disks

    mtillman-921105 (3/16/2011)


    My understanding is that for most current SQL applications, SSD is used for the TEMP DB (for performance). If the drive dies, swap another one in and forget...

  • RE: Happy Pi Day!

    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

  • RE: Server Class SSD SAS Disks

    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...

  • RE: Server Class SSD SAS Disks

    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;...

  • RE: sql query to retrieve data from database based on current date and time

    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)

  • RE: Custom Date Key???

    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...

Viewing 15 posts - 931 through 945 (of 3,011 total)