Your Daily Cup of WTF - Who Needs Stored Procedures, anyways?

I'm sure we've all heard, over and over, that inline SQL is generally a bad practice, and that we should use Stored Procedures when possible. But let's be realistic for a minute. Who wants to write a stupid stored procedure for every stupid little simple query needed. Like, for example, this query from an actual, production, report-producin' web page:

See how easy that was? For cryin' out loud, do we really need to write a Stored Procedure for something like that? It's only 156 lines or so. Stored Procedurers are for suckers!


Crossposted from TheDailyWTF.com. Got a WTF you'd like to share? Just fill out the Contact form and send it in!

1 Comment

  • I think the only reason I'm not crying is that I've seen worse. (Imagine doing this 3 times and programmatically writing it out to a -- fixed name -- text file, opening another query, physically padding it to the first one's output file format... "exec sp_cmdshell 'bcp .......'", AND DOING THAT FOR 6 MOTHER-LOVIN' QUERIES IN A MOTHER-LOVIN' ROW... (breathe... breathe... breathe...))

Comments have been disabled for this content.