Forum Replies Created

Viewing 15 posts - 1,141 through 1,155 (of 2,458 total)

  • RE: Generate sequence of numbers between values

    First, below is a simple and easy solution that is much less complicated than a loop-based, multi-variable solution. It also performs quite well (for when performance does matter).

    DECLARE @rng-2...

    "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: Rethinking Hiring

    I think there are three problems:

    1. The genuine need for talented data pros is growing much faster than the supply of talented data pros.

    2. Many (perhaps most) companies...

    "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: Are the posted questions getting worse?

    Brandie Tarvin (11/30/2015)


    Luis Cazares (11/30/2015)


    Brandie Tarvin (11/30/2015)


    Eirikur Eiriksson (11/27/2015)


    Brandie Tarvin (11/27/2015)


    My SO just informed me that he's learned how to write a LEFT INNER JOIN in Oracle.

    And now my head...

    "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: Identifying Rock/Paper/Scissors Scenarios

    jmpatchak (11/21/2015)


    My apologies. H/T to Alan for the script to set up the DDL:

    /****************************************************************************************

    (1) Setup DDL

    ****************************************************************************************/

    IF OBJECT_ID('dbo.Chooser') IS NOT NULL DROP TABLE dbo.Chooser;

    IF OBJECT_ID('dbo.Book') ...

    "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: Alternative Way to Parse JSON String?

    omegadev21 (11/20/2015)


    Jeff Moden (11/20/2015)


    Ah... maybe I missed it. Is this the data example?

    Given the field CLIENT_DATA of data type VARCHAR(MAX) with data:

    {"LASTNAME":"Doe","FIRSTNAME":"John","EMAILADDRESS":"something@email.com","USERNAME":"exusername","PHONENUMBER":"15555555555"}

    @jeff Moden, yeah that's the sample...

    If only 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: Identifying Rock/Paper/Scissors Scenarios

    This seems like a fun little exercise and this kind of thing sharpens your skills for sure. +1000.

    Here's what I put together. Note that I cleaned up your DDL....

    "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 Server/Instance List

    There's a bunch of ways to do this using T-SQL, a CLR, Powershell, cmdexec, etc. You should copy an attachment of what the text file looks like (you don't need...

    "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: Pieces of SQL code stored in table

    I wonder how popular this kind of solution is...

    Did anybody come across something similar?

    I'm currently on a project migrating an Oracle-based data warehouse / Cognos Reporting solution over to...

    "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: Alternative Way to Parse JSON String?

    A purely T-SQL solution:

    Consuming JSON Strings in SQL Server[/url] by Phil Factor

    "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: Help With Query

    Jacob Wilkins (11/20/2015)


    Perhaps something like this?

    CREATE TABLE Query_Test

    (

    CPU INT ,

    ApplicationName VARCHAR(100) ,

    ...

    "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: Query MSDB for SSIS packages connection managers

    This should do the trick. I just cooked this up and only had like 10 SSIS pacakages available to test against so there is likely more stuff you can extract....

    "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: Row number over guid

    <removed> Mistaken.

    "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: Querying AdditionalInfo xml field from ExecutionLog2?

    We have one particular report that contains 18 datasets, all stored procedure based, that needs to be studied for performance reasons, especially. Every now and then this particular report gets...

    "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: Improvements or enhancements from 2008 to 2014

    Sapen (11/20/2015)


    Is there a document or a url that discusses only about the improvements or enhancements or new features that were added in

    Database mirroing, logshipping, replication, clustering from version...

    "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: String Compare

    This is where a Tally Table is a good thing. I run into this kind of problem and want to know why 2 strings are not equal. This would probably...

    "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,141 through 1,155 (of 2,458 total)