Forum Replies Created

Viewing 15 posts - 1,306 through 1,320 (of 3,011 total)

  • RE: Order by Month properly not alphabetical

    In this example, I group by the first day of the month, order by that value, and extract year and month from that value.

    select

    [Year]= year(dateadd(mm,datediff(mm,0,Mydate),0)),

    MonthName= datename(month,dateadd(mm,datediff(mm,0,Mydate),0)),

    [RowCount]= count(*)

    from

    ( -- Random Test...

  • RE: Too old?

    I became a DBA when I was older than you, and I'm somehow managing to get by.

    There are projects that are so mismanaged that they become a death march that...

  • RE: Max Database size?

    524,258 terabytes

    Let us know if that limit becomes a problem.

  • RE: ISNUMERIC Issue

    It would by handy if SQL Server had an enhanced IsNumeric function that you could pass a specific target data type to, but that's the way it is for now.

  • RE: udf called within stored procedure runs slowly

    Are you asking for help optimizing code you did not post?

  • RE: retrieve current time

    The first condition will allow use of an index on the Date_Column, and the second will compare the combined date and time columns to 24 hours before current time for...

  • RE: Math function question

    Joe Celko (7/22/2010)


    brian.cook (7/22/2010)


    Thanks, I knew it would be something simple!

    Actually, using the proprietary MONEY is a huge problem. It does not divide or multiply correctly. It does...

  • RE: Query using right function in where clause is failing

    Adam Haines (7/21/2010)


    No need for a computer column here. You should use the like operator.

    DECLARE @t TABLE(

    col VARCHAR(10)

    );

    INSERT INTO @t VALUES ('13abc');

    INSERT INTO @t VALUES ('1abcde');

    SELECT *

    FROM @t

    where col...

  • RE: Incompetent or Malicious

    TravisDBA (7/21/2010)


    Steve Jones - Editor (7/21/2010)


    Until Red Gate, I had always worked at "at will" employment places. Still didn't prevent HR from being scared to terminate people.

    Really? I find that...

  • RE: Mathematical Calculation on a Column in a View

    PaulB-TheOneAndOnly (7/20/2010)


    Michael Valentine Jones (7/20/2010)


    Wouldn't this be a simpler calculation?

    COST = [Total Pageviews] * 0.000005

    Yes indeed but - always a "but" huh? - the other "more complex" way is...

  • RE: How do I calculate the week number given a date?

    Vaghasiya Nilesh (7/19/2010)


    Thank u guys...

    and one more thing my week is strat from saturday to friday

    and im enter today's date that giving me output will be like this:

    (dd/mm/yyyy)

    10/7/2010 -...

  • RE: Mathematical Calculation on a Column in a View

    Wouldn't this be a simpler calculation?

    COST = [Total Pageviews] * 0.000005

  • RE: Incompetent or Malicious

    Sounds like no one read his follow-up post on the blog:

    "...However, in this case we had been on a couple calls with EMC about this and even had their top...

  • RE: convert datetime into date and time.

    select

    a.DT,

    Date_Only = dateadd(dd,datediff(dd,0,a.DT),0),

    Time_Only = a.DT-dateadd(dd,datediff(dd,0,a.DT),0)

    from

    ( -- Test Data

    select DT = convert(datetime,'1753-01-01 00:00:00.003')

    union all

    select DT = convert(datetime,'1753-01-01 07:21:09.997')

    union all

    select DT = convert(datetime,'1753-01-01 23:59:59.997')

    union all

    select DT = getdate()

    union all

    select DT =...

  • RE: 64-bit MS SQL 2008 ... is it worth it?

    If you have another server available that is running a 32-bit OS, you could schedule jobs that require 32-bit ODBC drivers to run on that server.

Viewing 15 posts - 1,306 through 1,320 (of 3,011 total)