Forum Replies Created

Viewing 15 posts - 18,736 through 18,750 (of 26,484 total)

  • RE: Nested Case statement

    Greg Edwards-268690 (10/1/2009)


    Something along these lines...

    sum(case when DATEPART(yy,date_closed) = DATEPART(yy,getdate()) then 1 else 0 end) as 'YTD',

    sum(case when DATEPART(mm,date_closed) = DATEPART(mm,getdate()) then 1 else 0 end) as 'MTD',

    sum(case when...

  • RE: View Does not Update

    DDL is Data Definition Language, and what it means is the CREATE TABLE statements used to create your tables.

    Please read the article I recommended. It will help you get...

  • RE: View Does not Update

    If you are positive that the underlying tables are updated, then there could be a problem with the view. The problem, however, is that we can't see what you...

  • RE: Nested Case statement

    Greg Edwards-268690 (9/30/2009)


    in your join criteria...

    ON CONVERT(VARCHAR(11),date_closed,120) = CONVERT(VARCHAR(11),[CalendarDate],120)

    If you are joining on dates (date_closed to CalendarDate), they will always be the same.

    So all your case staements are effectively =

    DAY...

  • RE: Nested Case statement

    I have another question regarding CalendarDate and closed date, which table or view do they come from in the query. Neither of these columns have a table alias attached.

  • RE: Nested Case statement

    Having looked at your original code and seeing the CalendarDate always ends in 00:00:00.000 (ie 2009-09-30 00:00:00.000) and closed_date ends with a time (ie 2009-09-30 13:03:01.333), the following is how...

  • RE: Are the posted questions getting worse?

    Yes, i saw Gail also and dropped her a PM. She is still really busy.

  • RE: Are the posted questions getting worse?

    The force is lacking in this one, yes.

  • RE: CTE's and Temp tables??

    You can obfusicate your table and column names making it more generic such that you can show what you did to solve your problem.

    People do it all the time when...

  • RE: CTE's and Temp tables??

    Proper forum etiquette would have you show your solution. There may be others with similar problems and your solution may be helpful.

  • RE: Truncate log

    GilaMonster (9/29/2009)


    Lynn Pettis (9/29/2009)


    GilaMonster (9/29/2009)


    Please read through this - Managing Transaction Logs[/url]

    Add I must that article to the library in my sig block.

    Much more and your sig will be larger...

  • RE: Truncate log

    GilaMonster (9/29/2009)


    Please read through this - Managing Transaction Logs[/url]

    Add I must that article to the library in my sig block.

  • RE: Nested Case statement

    Curious am I as to your question.

  • RE: Truncate log

    river-653653 (9/29/2009)


    My database as 430 MB in the data file and 10GB in the Log file.

    I want to live the database in full recovery model, because i want to be...

  • RE: Truncate log

    river-653653 (9/29/2009)


    Hi,

    I have a database in SQL Server 2000.

    This database is in full recovery model.

    The log size is now of 10GB.

    I have made a backup of the...

Viewing 15 posts - 18,736 through 18,750 (of 26,484 total)