Forum Replies Created

Viewing 15 posts - 1,906 through 1,920 (of 2,462 total)

  • RE: Career future , stay or switch

    The company I work for has offices in a lot of markets (Seattle, NY, San Fran, Chicago, Houston, L.A., etc...). I have seen compensation fluctuate a lot based on cost...

    "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: SSAS guide

    SSAS is the Analysis part of the Microsoft BI stack (SSRS, SSIS and SSAS). Pre-2012 the only components were OLAP cubes (Dimensional model) and Data mining. In 2012 they...

    "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: Distribute data into groups based on existing numbers

    First let's create a function called topn...

    CREATE FUNCTION topn(@n int, @x int)

    RETURNS TABLE AS

    RETURN

    (

    WITH

    E1(n) AS (SELECT 1 FROM (VALUES (1),(1),(1),(1),(1),(1),(1),(1),(1),(1)) t(n)),--10

    E2(n) AS (SELECT 1 FROM E1 a CROSS JOIN...

    "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 Result for sequential range

    Just a quick note about duplicates.

    If the possibility exists for duplicate values then you would use DENSE_RANK instead of ROW_NUMBER. In the examples below I took Lutz' code...

    "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: Natively Compiled Stored Procedures: What they are all about!

    Great, great article Ed!

    "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: T-SQL Pivot Question

    I am better now Jeff, thank you for asking. I dislocated a rib last week. Got it fixed this weekend. All better now. No more softball for me until next...

    "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: T-SQL Pivot Question

    Luis Cazares (2/11/2014)


    Have you tested again?

    Luis - I completely flaked out and missed this message. I am truly sorry and feel like a jerk. I fixed the my code and...

    "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: T-SQL Pivot Question

    Jeff Moden (7/17/2014)


    Alan.B (2/7/2014)


    Using the tests below: at a million rows PIVOT generates a parallel plan and is like 4X faster. At 5million they both produce parallel plans and...

    "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: ORDER BY in a view

    ...I know that TOP ### in order to support ORDER BY is a kludge, that might disappear in a future release.

    I think I know what Post you are talking...

    "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: Is It Time To Clear Out Those Quirky Functions?

    Jeff Moden (7/10/2014)


    Alan.B (7/10/2014)


    Phil, you can make this more than twice as fast by turning it into an inline table value function like this:

    To that, I say... are you sure?...

    "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: Is It Time To Clear Out Those Quirky Functions?

    aochss (7/10/2014)


    Please, please make the error/warning messages better and more precise...Nothing worse than something like this:

    Msg 8152, Level 16, State 14, Line 1

    String or binary data would be truncated.

    The statement...

    "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: Is It Time To Clear Out Those Quirky Functions?

    Phil Factor (7/10/2014)


    Here is a LTRIM function that works for whitespace

    [font="Courier New"]

        -- does a particular procedure  exist

    IF EXISTS ( SELECT  1

                FROM   information_schema.Routines

                WHERE   ROUTINE_NAME = 'LeftTrim'--name of procedire

                        AND ROUTINE_TYPE = 'FUNCTION'--for 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: Is It Time To Clear Out Those Quirky Functions?

    ISNUMERIC('-') returns a 1. Discovered that this week (at an inconvenient time no less).

    "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: Stairway to T-SQL: Beyond The Basics Level 8: Coding Shortcuts using += and -= Operators

    It's worth noting that these are referred to as Compound Assignment Operators and you can use them for multiplication (*=), division ( /=), modulo (%=), and a few bitwise...

    "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: Instant File Initialization

    Great article, 5 stars. I new nothing about this. Learned something new today already!

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