Forum Replies Created

Viewing 15 posts - 1,741 through 1,755 (of 2,462 total)

  • 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

  • RE: SQL 2012 Query not efficient

    TheSQLGuru (3/4/2015)


    Nevyn (3/4/2015)


    For starters:

    SELECT PERSID,

    CASE MAX(CASE DUESTATUS

    WHEN 'Overdue' THEN 2

    WHEN 'DUE' THEN 1

    ELSE 0

    END)

    WHEN 2 THEN 'Overdue'

    WHEN 1 THEN 'Due'

    ELSE 'Unknown'

    END DUESTATUS,

    CASE MAX(CASE...

    "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: Why are cursors "more intuitive"

    I personally hate cursors because the syntax is bloated, counter-intuitive and just plain ridiculous. I have been writing SQL for 15+ years and still need to reference Books online or...

    "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: Cascading drop-downs

    DerbyNeal (2/25/2015)


    You would handle this in the default value for each child parameter. Make the default value the same as the available values

    Hi Alan,

    Thank you for your reply, I appreciate...

    "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: Where do senior SQL DBAs land finally?

    Sean Lange (1/30/2015)


    Jeff Moden (1/30/2015)


    Sean Lange (1/30/2015)


    Jeff Moden (1/29/2015)


    Sean Lange (1/29/2015)


    Alan.B (1/29/2015)


    I am certainly not anywhere at the same DBA skill level as say Jeff, Gail or Sean...

    Gosh I am...

    "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: Where do senior SQL DBAs land finally?

    Jeff Moden (1/29/2015)


    Sean Lange (1/29/2015)


    Alan.B (1/29/2015)


    I am certainly not anywhere at the same DBA skill level as say Jeff, Gail or Sean...

    Gosh I am humbled to be grouped with those...

    "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: Where do senior SQL DBAs land finally?

    Sean Lange (1/29/2015)


    Alan.B (1/29/2015)


    I am certainly not anywhere at the same DBA skill level as say Jeff, Gail or Sean...

    Gosh I am humbled to be grouped with those two in...

    "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: Cascading drop-downs

    I have created a report that contains a cascading drop-down. My problem is, when selections are changed/updated

    on the parent (Customer Stopped Status) drop-down I need all of the resulting...

    "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: Recursive Query

    Do you have any DDL? Sample data? Example of the desired output?

    "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: WHERE 1 = 1,who uses this besides me

    ChrisM@Work (2/24/2015)


    SQLRNNR (2/24/2015)


    ChrisM@Work (2/24/2015)


    Dogma spawns bad code as efficiently as laziness and ignorance.

    Nice. Great quote. I'm gonna use it now.:-D

    That’s Plan B. Plan A was one of those...

    "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: Dynamically Query a 100 Million Row Table-Efficiently

    PHYData DBA (2/24/2015)


    To start with. I did not carefully read the entire article.

    I stopped at the 5th time I saw "Select *" used in the code for an article about...

    "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: set a local variable

    What Steve said (I just saw his response as I was about to reply)...

    This is a good article SSC on the apostrophe topic... http://www.sqlservercentral.com/articles/T-SQL/95670/

    "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,741 through 1,755 (of 2,462 total)