Forum Replies Created

Viewing 15 posts - 436 through 450 (of 2,462 total)

  • RE: Today's Random Word!

    HappyGeek (9/30/2016)


    Eirikur Eiriksson (9/30/2016)


    Manic Star (9/30/2016)


    djj (9/30/2016)


    ChrisM@Work (9/30/2016)


    Kaye Cahs (9/30/2016)


    djj (9/29/2016)


    Grumpy DBA (9/29/2016)


    HappyGeek (9/29/2016)


    Coat

    Paint

    Brush

    Hair

    Today

    Tomorrow

    Evening

    Deadline

    target

    Costco

    "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: Execution Plan Help. Enormous Increase in row count in plan

    Is it possible that you could post the actual execution plan instead of the estimated plan? That will tell us much more. What you posted may not be the plan...

    "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: Splitting a multi-delimiter string and update

    I'm out of time but perhaps this can get you started. You can use DelimitedSplit8K_LEAD (see link in my signature) to parse the string like this:

    SELECT ItemNumber, item =...

    "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: Can you become a BI professional without any Front End Development Skills?

    Can you really be an effective BI professional without C# [or front-end] development skills?

    YES.

    I've been a BI Developer/Architect/Consultant for ~7 years and I am a total .NET language novice. Front...

    "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 2014 Developer edition

    I, too, had a real hard time with this, it took me a long time to find where/how to download Dev Edition. I remember that that key was to be...

    "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: Daily working Hours

    Provided you can get away with up to 2 clock_in's and clock_out's per person/date you can do this:

    WITH Prep AS

    (

    SELECT

    creation_date = CAST(creation_date...

    "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: Daily working Hours

    This should not be hard, I'm looking at this now.

    In the meantime, in case people want easily consumable sample data...

    SELECT * INTO dbo.test

    FROM

    (

    VALUES ('168780','10148','16477','7/21/2016 15:00','CLOCK_OUT','1','DAY','RICHAR'),

    ...

    "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: Adding Windows Function causes very bad performance (help plz!)

    Eirikur beat me to it on the POC index - that's always the first thing I look for when a window function makes a query much slower.

    I would add...

    "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: make over columns using comma seperated and select in query

    What you are doing does not make much sense. Perhaps you could post some sample data and your desired results and we can point you in the right direction.

    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: The Christmas CROSS APPLY

    Yay. I got one right.

    Personally I'd simplify this one like this:

    SELECT

    DATEADD(YEAR, N, CONVERT(DATE, v.HolidayDate)) AS HolidayDate,

    HolidayName

    FROM (VALUES ('12/25/2016', 'Christmas Day')) AS v (HolidayDate, HolidayName)

    CROSS...

    "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 creating a @table Table from a current table

    Lynn Pettis (9/27/2016)


    mister.magoo (9/27/2016)


    Lee Hopkins (9/27/2016)


    I have a script that gives me a string of the columns and types.

    I wan to use this result to create a declared table

    DECLARE @listStr...

    "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: How to Upgrade T-SQL Skills

    A lot of good advice here, especially

    The best way to get better at writing T-SQL is to write a lot of T-SQL.

    Over the years I have created dozens of...

    "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: PLEASE HELP ****** Stripping #s from one column to update 2 columns *******

    I have no idea what you're trying to do but it seams simple. Please post your desired results. On a side note -

    This:

    and (cm.Original like'6%' or cm.Original like '7%' 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: Dynamically creating a @table Table from a current table

    Building off of what Scott said - a table variable is not the best choice for what you are doing because it can't be referenced outside of the dynamic SQL...

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

    For fun, here's another option. This is a function I created a couple months ago which uses NGrams8K[/url]. The function allows you to grab everything between the mth and nth...

    "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 - 436 through 450 (of 2,462 total)