CTE's, Do you use them on an everyday basis?

  • Just wondering how many people actually use Common Table Expressions?

  • Can't say that I use them every single day, but I do use them quite frequently.

    - Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
    Property of The Thread

    "Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon

  • I'm still on SQL2000 in my production environment, but I can tell you that I used derived tables daily.

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

  • Bradley Jacques (10/1/2009)


    Just wondering how many people actually use Common Table Expressions?

    I use it a fair amount for two-step XML extractions (I have XML data being stored in a varchar column which I need to interrogate on occasion).

    ----------------------------------------------------------------------------------
    Your lack of planning does not constitute an emergency on my part...unless you're my manager...or a director and above...or a really loud-spoken end-user..All right - what was my emergency again?

  • Bradley Jacques (10/1/2009)


    Just wondering how many people actually use Common Table Expressions?

    My answer is somewhere in between your two poll answers. It's like asking if someone writes derived table code every day... the answer is "not every day".

    --Jeff Moden


    RBAR is pronounced "ree-bar" and is a "Modenism" for Row-By-Agonizing-Row.
    First step towards the paradigm shift of writing Set Based code:
    ________Stop thinking about what you want to do to a ROW... think, instead, of what you want to do to a COLUMN.
    "Change is inevitable... change for the better is not".

    Helpful Links:
    How to post code problems
    How to Post Performance Problems
    Create a Tally Function (fnTally)
    Intro to Tally Tables and Functions

Viewing 5 posts - 1 through 4 (of 4 total)

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