Forum Replies Created

Viewing 15 posts - 4,321 through 4,335 (of 6,400 total)

  • RE: The Beer Cooler Thread

    This could be a new side line business for Redgate, I'm sure that SQL Pun beers like that would go down very well with the community.

    I have to take my...

  • RE: Preventing and Logging DROP DATABASE

    Remove the /CommandText from the TSQL insert line.

    should look like this

    value('(/EVENT_INSTANCE/TSQLCommand)[1]', 'NVARCHAR(MAX)'),

  • RE: sp_who2 shows blank loginame

    Parellel queries is at the DB end and will be down to the execution plans and the way the SQL optimizer thinks is the best way to get the data...

  • RE: SQL Server Query

    Jan to Jan inclusive, so Jan 2011 to Dec 2011 plus Jan 2012 or just Jan 2011 to Dec 2011

    For Jan to Dec use

    SELECT * FROM AllData

    WHERE

    YearEnd = 2011

    AND

    DIV =...

  • RE: Help with Query - group by error

    If you run your original query, against the new query and export the actual query plans, I would be interested to see the differences, especially around the SARGable parts with...

  • RE: SQL Server Query

    Its your month end where clauses

    What you have is >= 1 and a <=1 which results in = 1

    If you remove the month_end where clauses it should work as you...

  • RE: Rogue transaction log backup

    Yes typically you would have an agent installed running as a service.

    Have you checked through the definitions of any procedures which may be executing a backup log command and a...

  • RE: Help with Query - group by error

    doh, got to add a name for the derived table,

    just add AS derived1 to the last line after the )

  • RE: Help with Query - group by error

    Give the below a try.

    SELECT

    CAST(AverageFixTime/60 AS VARCHAR(10)) + ':' + RIGHT('00' + CAST(AverageFixTime%60 AS VARCHAR(10)), 2),

    SupportGroup,

    [Month]

    FROM

    (

    SELECT

    (AVG(fix_time)/60) AS AverageFixTime,

    SuppGroup AS SupportGroup,

    DATENAME(MONTH,date_time) AS [Month]

    FROM

    calltable

    WHERE

    suppgroup IN ('WEBS', 'Tech','SQL')

    AND

    status <>'17'

    AND

    date_time...

  • RE: Rogue transaction log backup

    Something like NetBackup or another 3rd party component coming in doing the backup?

  • RE: The Beer Cooler Thread

    Can you ship some to the UK for us please? Reading them reviews after a quick Google, sounds right up my street.

  • RE: Help with Query - group by error

    exactly the same way as before, just replace the above for your original inner query

  • RE: Complex query

    Sounds a bit like a running total query

    http://www.sqlservercentral.com/articles/T-SQL/68467/

  • RE: Help with Query - group by error

    Something like this

    SELECT

    AVG(fix_time) AS AverageFixTime,

    SuppGroup AS SupportGroup,

    DATENAME(MONTH,date_time) AS [Month]

    FROM

    calltable

    WHERE

    suppgroup IN ('WEBS', 'Tech','SQL')

    AND

    status <>'17'

    AND

    date_time >= '2012-04-01'

    AND

    date_time < '2012-07-01'

    GROUP BY

    suppgroup,

    DATENAME(MONTH,date_time)

  • RE: Help with Query - group by error

    Can you attach the query plan for your original query and this one

    Looking at the query and what Andy has already said, the second group by isnt required as the...

Viewing 15 posts - 4,321 through 4,335 (of 6,400 total)