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!

Published Tuesday, May 25, 2004 11:48 AM by Alex Papadimoulis
Filed under:

Comments

Tuesday, May 25, 2004 5:58 PM by TrackBack

# re: Smart Paster 1.1 Add-In - StringBuilder and Better C# Handling

Saturday, June 05, 2004 1:36 AM by Sjoerd Verweij

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

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

Leave a Comment

(required) 
(required) 
(optional)
(required)