Forum Replies Created

Viewing 15 posts - 2,521 through 2,535 (of 5,841 total)

  • RE: Design considerations for database cleanup application.

    I would have nonclustered indexes on the requisite fields required to find the aged records (some date field on all parent tables I would presume). Child tables would need...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: FlushCache messages ... the ongoing quest for information

    On Win2K8+, you have to create a volume that is >=4GB for it to be sector aligned on 1024K. What most don't realize is that most servers ship with...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: FlushCache messages ... the ongoing quest for information

    I cannot give you the details you seek, but can provide the following input/responses:

    1) The server's IO is clearly not up to the task. RAID1 indicates just TWO spindles...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Running Totals

    Jeff Moden (6/23/2013)


    TheSQLGuru (6/23/2013)


    I got to stand on the shoulders of a TSQL Giant (hey Jeff!)! 🙂

    So that's what it was... I had a giant standing on my shoulders. 🙂

    No...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Running Totals

    mcertini (6/22/2013)


    Kevin,

    Awsome! Thank you for the solution.

    Mike

    Glad I could help! I got to stand on the shoulders of a TSQL Giant (hey Jeff!)! 🙂

    BTW, please do use the numeric...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Running Totals

    Does this do the trick?

    ;WITH

    cteSimplifyDateTime AS

    (

    SELECT DT = CAST(Year+Month+Day+' '+Hour+':'+Minute+':'+Second+'.'+Milisecond AS DATETIME), curItem

    FROM #mytable

    ),

    cteEnumerateGroups AS

    (

    SELECT DT, curItem, MyGroup = ROW_NUMBER() OVER (ORDER BY DT, curItem)-

    ROW_NUMBER() OVER (PARTITION BY curItem...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Running Totals

    Jeff, his first post with actual data in it had a "Concat" field, which seems to be a bit numeric with all the date-time values strung together. I think...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Running Totals

    mcertini (6/21/2013)


    Here is a portion of the complete result set. I need the program to look at the curItem as compared to the prevItem and if there is a...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Grouping Related Rows in Same Table

    Seems like further clarification of the needs is required. Should "chained" intersections be allowed/considered as one group? Or discarded.

    I also note that the cursor version for your data...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Grouping Related Rows in Same Table

    tssopa (6/19/2013)


    TheSQLGuru (6/18/2013)


    This solution was pretty quick to slap together and seems to do the trick, although I must admit to feeling slightly dirty posting it! :hehe:

    Thanks Kevin. ...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Grouping Related Rows in Same Table

    tssopa (6/19/2013)


    Okay, I am a little dissapointed. I had read how efficient and fast recursive CTE's are compared to CURSOR's, however when I run the CTE against my data...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Help me optimizing stored procedure

    ALWAYS is a bit strong.

    We will have to agree to disagree. I'm sticking with my statement.

    SQL devs should know this stuff.

    But they don't. Or they are in...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Grouping Related Rows in Same Table

    This solution was pretty quick to slap together and seems to do the trick, although I must admit to feeling slightly dirty posting it! :hehe:

    SET NOCOUNT ON

    CREATE TABLE dbo.#out...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Adding parameter to SqlCommand hides query from the profiler

    ericjorg (6/18/2013)


    OK, I appear to have fixed it by telling the profiler to watch for RPC:* events. Apparently adding a parameter turns the query into a remote procedure...

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

  • RE: Query running slow on prod.

    Why read the persons table three times when you only have to read it once?

    I have seen this type of query SOOO many times at clients over the years....

    Best,
    Kevin G. Boles
    SQL Server Consultant
    SQL MVP 2007-2012
    TheSQLGuru on googles mail service

Viewing 15 posts - 2,521 through 2,535 (of 5,841 total)