Forum Replies Created

Viewing 15 posts - 18,766 through 18,780 (of 26,489 total)

  • RE: Set date parameter

    Actually, Michael Valentine Jones looks simplier than mine, so I'd go with his. I wouldn't have posted mine had I read his first, but I got sidetracked a bit...

  • RE: Set date parameter

    How about trying this:

    declare @Date datetime;

    set @Date = '2009-09-15';

    select

    dateadd(mm, -3, dateadd(yy, datediff(yy, 0, dateadd(mm, 3, @Date)), 0)) as BeginFiscalYear,

    dateadd(dd, -1, dateadd(yy, 1,...

  • RE: The Dynamic Tally or Numbers Table

    doofledorfer (9/23/2009)


    As to the size of the table, you'll presumably write it to be large enough for the purpose to which you are applying it at the time. Validating its...

  • RE: While Loop

    Sounds like a case statement being used in the update. How many differnet values of id_promotionSub are there? How many rows of data in the fact table?

  • RE: Adding varchar (as Hours:Minutes:Seconds) to a datetime field

    Jeff Moden (9/22/2009)


    As a side bar... this is why I cringe at the idea that 2k8 actually has separate datatypes for date only and time only. Everyone is going...

  • RE: Very slow SQL query.

    Jeff Moden (9/23/2009)


    David Kranes (9/23/2009)


    Sorry for the delay in providing this. I have attached the DDL.

    Where? Not on that post...

    It was there, I opened directly, but I since...

  • RE: date format

    This is another way and doesn't use the convert statement:

    dateadd(dd, datediff(dd, 0, getdate()), 0)

  • RE: Performance question and advice??

    sqlislife (9/23/2009)


    Hi experts, I have always wanted to know this,

    What is the best way to write a tsql code for parametrized date ranges? For example

    create procedure procname

    (

    @datestart datetime,

    @dateend datetime

    )

    as

    select column1

    from...

  • RE: get data between dates

    Chuck Lucking (9/23/2009)


    I made the assumption that you want any task that is due today or in the past.

    create table #Task (Task varchar(10), Due smalldatetime)

    insert #Task select 'TaskA','09/21/2009'

    insert...

  • RE: get data between dates

    kiran_ramisetti (9/23/2009)


    Table: TaskTable ...

  • RE: how to divide by number of days in the month

    Thomw (9/23/2009)


    I've now built a case stm which works standing alone, but fails when part of the query. Either I'm missing something simple, or it doesn't work like this....

  • RE: Very slow SQL query.

    As asked before, would you please post the DDL for your table and the indexes?

  • RE: Are the posted questions getting worse?

    Silverfox (9/23/2009)


    Lynn Pettis (9/23/2009)


    I took a look at this particular thread. I do agree with you, Silverfox, and I am usually one tht tries very hard in this regard....

  • RE: Are the posted questions getting worse?

    Silverfox (9/23/2009)


    Gianluca Sartori (9/23/2009)


    If he insists killing processes without knowing what they do, let him do it.

    He already has decided to increase lock timeout and kill process, so, why bother?

    Has...

  • RE: The Dynamic Tally or Numbers Table

    Elliott W (9/22/2009)


    Lynn, great article..

    You make reference to Jeff's article, I'm curious how this method compares to Jeff's method..

    CEWII

    I'm not sure what you are talking about. I...

Viewing 15 posts - 18,766 through 18,780 (of 26,489 total)