Forum Replies Created

Viewing 15 posts - 151 through 165 (of 3,011 total)

  • RE: Strange Behavior with (nolock)

    I suggest running this to see the count with and without the NOLOCK to see if it is even related to the NOLOCK hint:

    declare @st datetime;

    set @st = getdate()

    SELECT count(*)...

  • RE: Divide By Zero error when I use a case statement

    Try this:

    SELECT

    ForcastUnitsTimesOMSCost,

    SUM(isnull(CTCBOHAndWCSBOHTimesOMSCost/nullif(ForcastUnitsTimesOMSCost,0.00),0.00)) as Calculation

    FROM

    MyTable

    Where

    (CONVERT(date, GETDATE()) BETWEEN EventStartDate AND EventEndDate)

    Group By

    ForcastUnitsTimesOMSCost

  • RE: The Case of the Lost Card

    The building has a guard on duty at the building entrance 24x7. Everyone has to use their card to enter the building through a turnstile, and everyone has to...

  • RE: set date/time to today date but certain time

    This should do it:

    select TodayAt4am = dateadd(dd,datediff(dd,0,getdate()),'04:00:00')

    Results:

    TodayAt4am

    -----------------------

    2013-10-11 04:00:00.000

  • RE: Create Full Backup with Multiple FileGroups

    AndrewSQLDBA (10/2/2013)


    Thanks Michael

    Those other options are what SSMS put there. I used the "wizard" and then did the "script to new window".

    I did a test, but the size of the...

  • RE: Create Full Backup with Multiple FileGroups

    That code will create a full backup that includes all filegroups.

    You don't need the NOFORMAT, SKIP, NOREWIND, and NOUNLOAD options. They only apply to tape.

    You should probably leave out...

  • RE: Find difference in time which is AM PM format

    Convert them to datetime values and use the DATEDIFF function to find the difference.

  • RE: SQL Server Enterprise Edition: Core-based Licensing (64-bit)

    SQL08Kid (9/27/2013)


    Thanks Gail for the response.

    I don't ever deal with licensing so I don't know much about it....

    With that being said, are the only two options for SQL Server 2012...

  • RE: SQL Server Enterprise Edition: Core-based Licensing (64-bit)

    The only new license option for SQL Server 2012 Enterprise Edition is Core-based. Server/CAL is not an option for new 2012 Enterprise Edition licenses.

    There is an option for Server/CAL...

  • RE: Shift week to Wed - Tues

    Jeff Moden (9/26/2013)


    Michael Valentine Jones (9/26/2013)


    Jeff Moden (9/26/2013)


    Michael Valentine Jones (9/25/2013)


    That's not really the best way to go because it depends on the setting of a run-time session parameter, DATEFIRST.

    Although...

  • RE: Shift week to Wed - Tues

    Jeff Moden (9/26/2013)


    Michael Valentine Jones (9/25/2013)


    That's not really the best way to go because it depends on the setting of a run-time session parameter, DATEFIRST.

    Although I certainly prefer you method,...

  • RE: Shift week to Wed - Tues

    paul.j.kemna (9/25/2013)


    We don't own the calendar table, so that is not really an option.

    Anyway, my boss and I came up with this code as an option as well:

    DECLARE @someDate as...

  • RE: How to change default database for multiple users (logins) at once?

    You have to execute the command once for each user, but you can have multiple commands in your script.

  • RE: EST TO UTC

    Create a table that holds the DST start datetime and end datetime for each timezone you need to convert, and do a lookup against that table to determine if the...

  • RE: Lookup tables - when too ude them

    bugg (9/16/2013)


    Hi All,

    I need to create an attribute table for say a product. Each of the attributes for a product can have have different fixed 'look-up' types.

    My question is do...

Viewing 15 posts - 151 through 165 (of 3,011 total)