Forum Replies Created

Viewing 15 posts - 4,786 through 4,800 (of 7,613 total)

  • RE: Search through rows with specific values

    My understand was that all operation codes needed shown, not just the two being checked.

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Dynamic String Replacement

    SELECT STUFF(

    (SELECT ','+LTRIM(RTRIM(LEFT(Item, CHARINDEX('=', Item + '=') - 1)))

    FROM dbo.DelimitedSplit8K (t.data, ',') ds

    FOR XML PATH('')),

    ...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Search through rows with specific values

    This is probably the most straightforward, albeit perhaps not the very most efficient:

    SELECT

    J.DT_ID

    ,J.OperationCode

    ,J.EmployeeCode

    ,J.JobNumber

    FROM @TEST_DATA J

    INNER JOIN...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Implicit conversion comparing INT column to 0

    Would need to see the actual query plan to see what that implicit conversion is so significant. There must be something going on with a table column, not just...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Best idea - summary field

    Sean Lange (9/15/2015)


    Lowell (9/15/2015)


    i would use a view that does the calculation from your post above, and then you can poll the view instead of the base table. that is...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Smalldatetme (Query with Where, Cast, DATE vs Others)

    Yes, it's normal. Indeed, it's the only way to get consistently accurate results.

    In general terms, if you're comparing a value including a time, you need the time to get...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Log file management in simple recovery model

    Kristen-173977 (9/15/2015)


    ScottPletcher (9/15/2015)


    Can't imagine why SQL would automatically issue a checkpoint just because an index is rebuilt. I have no idea whether a maint plan does or not, although,...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Log file management in simple recovery model

    Kristen-173977 (9/15/2015)


    ScottPletcher (9/15/2015)


    Look for a maintenance plan that is rebuilding indexes

    Won't an index rebuild CHECKPOINT after each index? - and thus would I be right in thinking that this would...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Displaying Code of a Stored Proc

    FYI, you can also use the function:

    OBJECT_DEFINITION()

    to get that text.

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Implicit conversion comparing INT column to 0

    An implicit conversion of a constant or variable to a different data type shouldn't cause performance issues, since that's a one-time thing, and it's being done to prevent the much...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Speed Up Creating Temp Table

    Instead of solving queries against this table one at a time, fix them all in one shot.

    Cluster the ml table on processingstarted if that is how you typically query against...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Interesting Way to Parse Comma Separated Values

    I wouldn't think you'd want to force the parameter values to be the same to group them. That is, as long as they specified params 1, 3 and 5,...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Log file management in simple recovery model

    Look for a maintenance plan that is rebuilding indexes. I believe it would rebuild all indexes on the selected db every time, without regard to size or how fragmented...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: One of the most complex Views i have ever seen (View nested into another view)

    Lynn Pettis (9/15/2015)


    Ed Wagner (9/15/2015)


    Eirikur Eiriksson (9/14/2015)


    Sorry, slightly hurried and inaccurate

    😎

    CONVERT(DATE,AppDetails.DateDetailDisposed,0) = CONVERT(DATE,DATEADD(DAY,-21,getdate()),0)

    If your DateDetailDisposed column is a datetime data type, you might run into a performance problem here. ...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

  • RE: Date issue

    You just need to adjust the numbers in the calc below until it returns the date you want. I put my best guess in, but adjust as needed.

    --To stand-alone...

    SQL DBA,SQL Server MVP(07, 08, 09) "It's a dog-eat-dog world, and I'm wearing Milk-Bone underwear." "Norm", on "Cheers". Also from "Cheers", from "Carla": "You need to know 3 things about Tortelli men: Tortelli men draw women like flies; Tortelli men treat women like flies; Tortelli men's brains are in their flies".

Viewing 15 posts - 4,786 through 4,800 (of 7,613 total)