Forum Replies Created

Viewing 15 posts - 1,726 through 1,740 (of 2,458 total)

  • RE: SQL

    To get help faster include some DDL (note the link in my signature).

    In the meantime I would suggest that you avoid using ORDER BY <number> and use ORDER BY <column...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Stored procedure to read XML

    I don't really understand your question and could not help you without any DDL.

    That said, note the XML below. I created two variables, the first with the old XML...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Slow Table Performance

    dschubel (3/6/2015)


    I have a table that is part of a Suite CRM installation. It Contains approx 1.5 million rows. When I do a "Select all rows" in SSMS it take...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Trying to generate a parallel execution plan

    mister.magoo (3/5/2015)


    Alan.B (3/5/2015)


    Mr. Magoo... If you are out there perhaps you could chime in:w00t: you know much more about this than I do...

    Wow, I appreciate the kind thought, but I...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Dynamic Return type in a function

    Jeff Moden (3/5/2015)


    Alan.B (3/5/2015)


    Chris, Jeff...

    If I understand the OP correctly, they could not solve this problem with ISNULL or COALESCE alone because of the awkward data type requirement.

    Let's review...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Trying to generate a parallel execution plan

    Oh dang! It does not appear that makeparallel() will help you get a parallel plan here...

    First, here's a little background on the function:

    Some time ago Paul White wrote an amazing...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Need help with pivot table in SQL server

    See these two articles by Jeff Moden:

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns[/url]

    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs[/url]

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Searching to see if an XML node exists

    No problem. I too have been there ripping my hair out on SQL-XML namespace issues. 😉

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Best SQL Challenege: TSQL Query Maximum Concurrent Connections (Participants)

    Itzek Ben-Gan has some clever SQL Server 2012 and non-2012 solutions for this type of problem in his book, Microsoft® SQL Server® 2012 High-Performance T-SQL Using Window Functions

    I have not...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Trying to generate a parallel execution plan

    The query optimizer does not always get it right but seems to correct more often that not provided that your system is configured correctly. MAXDOP(0) won't do anything for you...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Searching to see if an XML node exists

    ... and for a bonus answer. Because of the XML data structures/schemas I deal with I can get away with the lazy guy technique of "*:". This is not a...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Searching to see if an XML node exists

    First, welcome to SSC! The sample data you provided was very helpful. In the future try to include some DDL to create the table you are working with. Today I...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: If user is mapped to master, can they access all dbs?

    To expand on what Nevyn said, they will only have access to Master.

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Dynamic Return type in a function

    Chris, Jeff...

    If I understand the OP correctly, they could not solve this problem with ISNULL or COALESCE alone because of the awkward data type requirement.

    Example:

    DECLARE

    @x1 varchar(10) = NULL,

    @x2...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Unable to delete Idera SQL Doctor and Dash Board

    sureshjevani 78421 (3/5/2015)


    I unable to uninstall Idera Dash board Repository and Idera Doctor. It created two databases in my dev server. I unable to drop them and getting an error...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

Viewing 15 posts - 1,726 through 1,740 (of 2,458 total)