Forum Replies Created

Viewing 15 posts - 526 through 540 (of 2,458 total)

  • RE: Data Warehouse Design Question

    My question is would it be better to create a Stage and House for each customer instead of the single method we are doing now? Some of our fact tables...

    "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: DynamicDateRangeGenerator

    ... and if we're talking about always doing 3 years behind/ahead of the current year you could even do this:

    WITH currentYear AS (SELECT yr = YEAR(getdate()))

    SELECT yr = yr +...

    "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: Loop through an integer and test the values and update with a char

    The NGRAMS tool you wrote is very cool. Don't blame you a bit. 🙂

    😀

    "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: Indexes

    The confusing thing about clustered indexes and primary keys is how, by default, SQL server uses the PK columns as the keys for the clustered index when you create 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: Loop through an integer and test the values and update with a char

    Jeff Moden (8/17/2016)


    Just an opinion... you just about can't beat a Nested Replace, like what Scott wrote, for something like this. I say "just about" only because I don't...

    "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: Confused about backups and recovery models

    Here's a good article by Gail Shaw that discusses Recovery Model internals and has some really good links about what's going on under the hood (if that's what you're looking...

    "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: Loop through an integer and test the values and update with a char

    A couple other ways:

    1. Use NGrams8K[/url] like so:

    DECLARE @price decimal(12,2) = 12345678.90;

    SELECT NewPrice =

    (

    SELECT CASE WHEN token LIKE '[0-9]' THEN CHAR(ASCII(token)+17) ELSE token END

    FROM dbo.NGrams8k(@price,...

    "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: Quick question on Full-Text Indexes

    It's likely that both versions will produce the same execution plan. I would probably go without the CTE because the first query is less complicated. That said, it may 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: Date gaps between date spans

    This is a classic gaps/islands problem. Have a look at this article:

    https://www.simple-talk.com/sql/t-sql-programming/the-sql-of-gaps-and-islands-in-sequences/%5B/url%5D

    "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: Question on Extended event

    vsamantha35 (8/15/2016)


    Is there a way using dmvs / trace to get know the the timeout set for a query? I can ask the application team but I am curious 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: tokenize string into key value pairs

    That's a mighty big font you got there.

    A complete solution will take some time but here's a couple techniques to break your input string into a seperate row for...

    "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: Index INCLUDE

    nsadams87xx (8/12/2016)


    So it really should only be used with columns that are not updated very often, have large amounts of data, and those columns are often used together?

    Adding to what...

    "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 do you know when it is time to leave a job?

    HappyGeek (8/11/2016)


    Iwas Bornready (7/25/2016)


    Yet Another DBA (7/22/2016)


    Time to leave?

    Hmm, with some companies its the day after I started.

    That's sad you didn't know that before you started.

    So how exactly do 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: Count the occurrence of word in a Resume Table

    shambhavi13 (8/11/2016)


    Thank you so much .

    Have one another question in mind .. what if I want to search more than one one word in a single document but 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: Make Schema Changes on Publication Databases

    Suth (8/12/2016)


    Hi,

    I currently need to make a number of schema changes to a database that is set up for replication (Transactional) the schema changes...

    "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 - 526 through 540 (of 2,458 total)