Billing of Materials query

  • CELKO (9/21/2012)


    Celko won't like it because recursive CTEs are a Microsoft specific extension to the SQL syntax. By all means read his book (or any other posts on the web about it), but if you are working in SQL2005 or higher, then use CTEs.

    No, the recursive CTE is part of the SQL:2002 standards. They were first presented to ANSI X3H2 by Phil Shaw of IBM and had a ton of options for controlling the search (depth first, width first, so many levels, etc)

    I don't like because they are slow (really a cursor and loop under the covers) and they get your code into a "traversal mindset" where you re-invent an IMS database in T-SQL, without even knowing it.

    Before anyone says what about portability - really - how often do you port database from one platform to another.

    That is a lot of my consulting work. No shop of any size is one-vendor today. And you forget that moving from one release to the next of the same product is porting!

    I like to write the ANSI Standard code as a comment so that if the next guy has trouvle with dialect, he can read the comment for the intent.

    When*= went away, my clients un-commented my ANSI Standard stuff and erased the old statements the first week.

    And it worked? Amazing since I have yet to see you post any code that even parses without errors.

    NOTE: I have only tested recently posted code, last week or two.

  • And you forget that moving from one release to the next of the same product is porting!

    No, it's not. At least not in the case of tsql. I've done hundreds of upgrades and the difficulty tends to vary based on the distance between releases in the source and target. Moving from SQL Server 2008 to SQL Server 2008R2 or 2012 was a trivial exercise. Moving SQL Server 4.2 to 2012 might be more challenging, but nowhere near as difficult as moving from any release of SQL Server to any release of Oracle. Moving DTS to SSIS was a pain, but that is irrelevant to the 'porting sql' assertion.

    Just my 2 cents...


    And then again, I might be wrong ...
    David Webb

Viewing 2 posts - 16 through 16 (of 16 total)

You must be logged in to reply to this topic. Login to reply