Forum Replies Created

Viewing 15 posts - 31 through 45 (of 2,458 total)

  • Reply To: Regex Help

    I've just added CLR Regex Functions to our SQL Servers.

    I'm trying to replace some of our less efficient string parsing TSQL functions with the new .Net CLR Regex Functions.

    For things...

    "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

  • Reply To: Are the posted questions getting worse?

    If anyone is interested in a rather interesting problem has a look at this: https://www.sqlservercentral.com/forums/topic/table-function-returns-varying-number-of-records-for-an-update-statement

    I gave up.

    "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

  • Reply To: Table Function returns varying number of records for an update statement

    I'm really curios to what is happening internally for the varying set of records that get updated.

    This is one of the more interesting problems I've seen in a while on...

    "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

  • Reply To: Table Function returns varying number of records for an update statement

    To  quote Ned Flanders, "Wow! As melon scratchers go, that's a honey doodle."

    I can confirm that I see the same issue and racked my brain trying to figure out how...

    "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

  • Reply To: Extract Blocks of Number

    Jonathan AC Roberts wrote:

    Alan Burstein wrote:

    Grab a copy of NGrams8k and you can do this:

    Declare @Temp Table(SomeId INT IDENTITY, [Data] VarChar(8000))

    Insert @Temp ([Data])
    Values('hello my name is john 07999999999 smith 07888888888...
    "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

  • Reply To: Extract Blocks of Number

    Grab a copy of NGrams8k and you can do this:

    Declare @Temp Table(SomeId INT IDENTITY, [Data] VarChar(8000))

    Insert @Temp ([Data])
    Values('hello my name is john 07999999999 smith 07888888888 this last...
    "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

  • Reply To: Understanding Outer Joins in SQL

     

    This is an inner join, and is an intersection of the data in the tables. This is shown in the image below.

    Careful here. An Inner Join and an Intersection are...

    "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

  • Reply To: SELECT processed before WHERE clause

    The order of processing is as follows:

    FROM

    WHERE

    GROUP BY

    HAVING

    SELECT

    ORDER BY

    LIMIT

    LIMIT is MySQL not SQL Server. The last three things to be processed are : SELECT then TOP / OFFSET then ORDER...

    "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

  • Reply To: t-sql 2012 cross join

    I do not understand the benefit of using a 'cross join' versus an 'inner join' on the sql above pointing to the same table?

    There is no "benefit", it's a design...

    "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

  • Reply To: Views vs. UDFs vs. Stored Procedures for Data Warehouse Reports

    imani_technology wrote:

    This is good information.  My question now is, why even use a UDF as a source for a report?  Why not just have the report user access a view...

    "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

  • Reply To: Views vs. UDFs vs. Stored Procedures for Data Warehouse Reports

    First, as a general rule: when considering user defined functions (UDFs) the most important thing is if the function is inline or not. If performance is important, the only viable...

    "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

  • Reply To: Ordering by Alias

    Good one Steve!

    "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

  • Reply To: Introduction to the Partition By Window Function

    MVDBA (Mike Vessey) wrote:

    a great start - I use rownumber over (partition by order by) a lot

    one of the more overlooked windowing fuctions though is NTILE - especially when you are dealing...

    "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

  • Reply To: Using Graph Theory To Group Records

    Absolutely brilliant! I love this article. Well done. Five stars.

    "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

  • Reply To: working days

    Sue_H wrote:

    Alan Burstein wrote:

    Sue_H wrote:

    You would probably want to create a calendar table when you also want to exclude bank and national holidays since those can vary by country, company 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

Viewing 15 posts - 31 through 45 (of 2,458 total)