Forum Replies Created

Viewing 15 posts - 1,321 through 1,335 (of 7,619 total)

  • Reply To: Cursor replacement suggestions

    Sorry, no, I just need to get time to get back to it.  I should be able to do that tomorrow.

    We have to reduce the overhead in the Write proc...

    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".

  • Reply To: Not getting expected index seek.

    Jackie Lowery wrote:

    ScottPletcher wrote:

    Actually, it depends on how the table is searched.

    Do you often filter the rows by only type when SELECTing?  If so, then the clus index makes sense...

    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".

  • Reply To: Not getting expected index seek.

    Jackie Lowery wrote:

    Jeff Moden wrote:

    Looking at the Clustered Index for the oeordlin_sql table, I'm a wee bit concerned (especially for insert and update performance) over having the leading column be in the...

    • This reply was modified 5 years ago by ScottPletcher. Reason: Edited to improve clarity

    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".

  • Reply To: Copy an existing table to a new table...

    stephen.aa wrote:

    None of this works:

    ...

    SELECT * INTO 2415_10_Ga_Trunking_Design_Configurator FROM 2415_12_Ga_Trunking_Design_Configurator

    What about that doesn't work?

    If you don't want any data in the table, use TOP (0) and/or WHERE 1 = 0...

    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".

  • Reply To: I need to combine these two query's

    You're welcome.  Thanks for the feedback.

    If you would mark it as the answer, it could help people looking at this later, as they will then know the q has been...

    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".

  • Reply To: Is that a reason DBA should Install SQL Server

    Jeff Moden wrote:

    Our situation appears to be quite a bit different than yours (and no... neither is wrong, IMHO... they're just different because of different business requirements).  My best friend, who...

    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".

  • Reply To: I need to combine these two query's

    I think FULL OUTER JOIN is what you need here:

    SELECT
    COALESCE(sales.mth, receipts.mth) AS mth,
    COALESCE(sales.yr, receipts.yr) AS yr,
    ...

    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".

  • Reply To: Is that a reason DBA should Install SQL Server

    Jeff Moden wrote:

    Correct.  We never do multiple named instances on a server.  Heh... they still haven't found the body of the last person that tried to do that on our servers....

    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".

  • Reply To: Is that a reason DBA should Install SQL Server

    SQL Server will install some things on the C: / main Windows drive regardless of what you do.

    Jeff Moden wrote:

    The windows teams have a nasty habit of installing SQL Server on...

    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".

  • Reply To: Not getting expected index seek.

    Better to script out the indexes; sp_helpindex doesn't show INCLUDEd columns, for one major failing.

    A simple sys.sp_helptext on the view to show us its definition is fine.

    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".

  • Reply To: Cursor replacement suggestions

    ScottPletcher wrote:

    You could do some major clean up on your existing code:

    ...6. Since Write_Error_Log is called *so many* times, need to see the code for it too. It needs to...

    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".

  • Reply To: Not getting expected index seek.

    It also looks like you're querying a view for oeordlin rather than the actual table.  If you are using a view, the text for that view would help us a...

    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".

  • Reply To: Advantage of having multiple files is a filegroup designated for LOBs ?

    Presumably yes, for the same reason.  The total I/O will be spread across two files rather than one.

    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".

  • Reply To: Need help on Substring

    SELECT LEFT(first_name, 10) + CASE WHEN LEN(first_name) > 10 THEN '...' ELSE '' END AS first_name 
    FROM @t1

    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".

  • Reply To: Seeking input on Best Method to Join on First or Last Row in a 1:M Join

    I've noticed, and been impressed by, the overall great performance of the ROW_NUMBER() functions.

    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 - 1,321 through 1,335 (of 7,619 total)