• As one of the 40% who got this wrong (and learned from it) I'd say there are several advantages to a procedure like this:

    1. It's great for problem solving. If there are any issues on the database, this procedure can be immediately eliminated as a cause of any problem.

    2. It's perpetually easy to debug.

    3. The universality of the function allows granting full execute status to anyone with access to the database.

    4. One might call it a politically correct procedure because everyone can use it and no person (or database) should be offended by it.

    5. It can be a great source of entertainment as seasoned DBA's can initiate newbies by telling them to find out where the missing SQL went from the procedure. This is analagous to factory workers making new hires hunt for left handed wingnuts back in the day. Trust me, you've never lived till you spent a day looking for a left handed wingnut...

    Bob

    PS: I didn't mind getting it wrong. It sure made sense to me that an error should be generated for a sproc with no statements to execute. So much for logic. Thanks.