• Heh... "Don't use undocumented features"... as opposed to what? Using just the documented ones? You mean like the wonderful and heavily documented sp_MakeWebTask whose required privs changed overnight and without warning when they shifted for 2k sp3a to sp4? Or how about when the heavily documented SUM() OVER is finally updated to meet ANSI standards so we can actually use it to do a running total?

    That little privs change on sp_MakeWebTask killed a lot of people's code because it now requires "SA" privs and a lot of smart DBA's won't allow users or procs to have "SA" privs. And I can't wait to see all the code that breaks when they finally fix SUM() OVER and all the poor buggers currently using it in their code have to go back and fix things.

    And then, there are the undocumented features that have already been discussed. I'll also add in the wonderfull xp_DirTree (3 operand version) and a couple of others that seem to be cast in stone. They've been there for at least 3 versions of SQL Server... why Microsoft doesn't document them, one can only guess.

    To me, saying "Don't use undocumented features" is like saying "Write only ANSI code". There's a lot of things that just wouldn't get done and SQL Server would truly be "just a place to store data"... or worse... it would look and work (I hate it) like Oracle. 😛

    And, all you Oracle guys who are going to get all up in arms about what I just said about Oracle... lemme ask you... how do YOU return a result set from a stored procedure to a GUI. Ok... you can sit back down. :hehe:

    --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)