My Links

Advertisement

News

Welcome to my weblog. My name is Jeff Smith, I am software developer in Boston, MA and I was recently named a 2009 SQL Server MVP. Check in frequently for tips, tricks, commentary and ideas on SQL Server and .NET programming.

When I have multiple values in my columns, like "JAN,FEB,MAR" or “15,84,22” , SQL Server just doesn't get it. It's almost impossible to write SQL statements on tables like that! If I can manage to get any data out at all, it ends up being a 500 line SELECT statement!! What is up with that? And it also takes an act of God to successfully delete a value from those lists. Why does MS make things so complicated?

2. Datatype conversions!

What is the deal with data types? I just use VARCHAR for everything, since that's the only way to avoid stupid error messages when I add data to my tables. Works great, until I want to get the month of a date or add two numbers -- stupid SQL Server makes me convert() the value first. How dumb is that? SQL doesn't know how to add "12" and "5" -- it thinks it's "125" !!!! To make things even worse, SQL Server gives me errors half the time saying it CAN'T convert! Uh, you are a computer; you should be able to figure this stuff out.

3. Uh .... Formatting?

We've all been there: You want to right-justify a column in your SELECT -- it cannot be done without jumping through hoops! Never mind centering, indenting, page numbers, or things like that. Also, it is really a pain to format dates or round numbers just the way I want. I can barely write a decent looking report using Query Analyzer, it looks like old MS-DOS text files! Maybe it's time to move into the 21st century with some support for graphics, colors and fonts, huh Microsoft?

4. Sorting is broken!

Half the time my records come back OUT OF ORDER! That’s right, not sorted by anything! It's a mess. SQL Server should understand that things should be sorted by lastname/firstname or by date without me having to tell it! This is supposed to be a smart computer, right? My users really hate this, because it’s hard to find stuff on their reports. When they complain, I just tell them, “Hey, maybe if you weren’t so cheap and we had Oracle we wouldn’t have to deal with this Microsoft ‘feature’! ”

To make things even worse, when I do try to sort, SQL Server thinks that “December” comes before “January”, or that “10” is less than “2”! Uh, Mr. Gates, no wonder you never release your products on schedule, you guys have no concept of how a calendar works!

5. The IN() operator never works!

This one drives me nuts. Using IN (@Var) never works right! I never get back what I want, even though @Var clearly has a nice list of ID’s in it. And you don't even get an error message!

6. Foreign Keys Constraints !

For some reason, in SQL you can only update or add rows to 1 table at a time! I can do my usual FULL OUTER JOINs with 800 tables together and go nuts with SELECTs all day long, but how about providing that feature for UPDATES and INSERTS!? Otherwise, how can I have referential integrity? If table A needs a matching row in table B, then how the heck do I get them in there at the exact same time? This seems pretty silly to me.

7. Primary Keys don't work!

This drives me nuts. I have an identity primary key called "ID" on every table, but I still get duplicate data! I must have 20 different entries for Vermont in my “tblStatesTable” table! What's the point of primary keys, then? I hope the next service release fixes this.

8. S-Q-L is S-L-O-W !!!

What is the deal with how slow SQL is? For example, to find all of the data for January in my table, I use

WHERE LTRIM(tblTable.tblTable_colMonthList) LIKE '%JAN%'

Pretty standard stuff. But it takes FOREVER! And the column is indexed!! Hey, Micro-slow, the index is supposed to make things FASTER you know!

Column 'orders.OrderID' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.

Or sometimes I build some cool dynamic SQL strings, but they don't seem to work and I get:

You are not allowed to truncate the system table 'master..sysobjects'.

Hello? How about some details about what went wrong, not just cryptic mumbo-jumbo that's too long to read. Hey, Bill Gates, how about spending some of your $$$ making sure SQL Server is bug-free and doesn't generate all these nonsense error messages! Who has time to interpret all this crap?

10. Table and Column referencing!

This one is crazy. OK, we have smart computers, right? And we have things called variables, right? We can store anything in these variables, even column and table names. But this never works:

Select @TableName.@ColumnName from @TableName

Makes sense to you, makes sense to me, I don't know why SQL Server cannot figure it out! How can I get data from 'tblCustomerNumber0121' versus 'tblCustomerNumber0122', or get data for column 'Jan2005', if I cannot use variables here!? These things must be hard-coded!? How the heck am I supposed to write reports with user parameters when I am limited to pre-defined table and column names!? Come on, Micro-stupid, how about some REAL programming features in T-SQL like FULL support for variables!

It's also a real pain to add new data to tables. INSERT? That never works! INSERT can't even add a new column to my tables! How am I supposed to add data for a new month when I don't have that column yet? Maybe SQL Server 2005 will finally address this.

...

(Note from Jeff: All comments are welcome, but please be sure to read some of the other comments before posting ... thanks! It also might help to read this as well.)

SQL Server isn't a UI, it isn't a reporting system, it's a database. The other stuff you do elsewhere.

By the way - things come back unsorted by default on purpose. That's part of conforming to an ANSI SQL sytem - study up on relational theory and you'll see why. They do have this handy statement called ORDER BY that allows you to sort things any way you like.

SQL Server is not a database. It's a DBMS (database management system).

And results of queries without an ORDER BY clause are not returned unsorted "on purpose." It's not as though the server randomizes the output. The results are unsorted simply because they happen to not be sorted.

You got me - I didn't catch that it's tongue in cheek. I take all that back!

Oh, and to Adam - I never said SQL was SQL Server. And also the part about the sorting is in fact on purpose. The orignal concept for SQL was that the sort order on a column was "not guaranteed". That isn't to say that it is mixed up, just that there is no sort. You're correct in stating that it is retrieved in the order it happens to be stored at the moment. The only time this isn't true is when a clustered index is used, which of course then physcially stores the data as the index states, since it is the index.

A good read - maybe next time I'll turn on my sense of humor when I read!

LOOOOOOOOOOOOOOOOOOOOOOL smarty what's a resonable reasons to hate SQL Server, listen to my dont waste your money on oracle or any other DBMS, i think thousands of papers and a pen will be much usefull for you

I feel exactly the same way. I mean, don't get me wrong...I consider myself a preety smart loser but I totally agree when you say 'Its a computer! It should be able to figure it out.' Its insane how much time i spend on google looking crap up for sql! Anyway, I'm sure some swine out there is going to have something stupid to say about my post but I just wanted to add my 2 cents to this rant. SQL is stupid. Computers are dumb. Its 2005! We were promised flying cars by 2000. Lies.

I really liked the "Cryptic Error Messages" in my user app I have to maintain I started out taking a lot of time trying to create user as a people with high school education level of error messages, but no body reads the message. So know I make only the effort for smart people level of errors. The dumb people can't read I have decided.
Tim S

GOD ONEE THING I REAALY HATE ABOUT TEH SQL IS THAT IT DOESSN'T SUPPORT HTML CONTROLS --- I HATE TO HAVVE TO WRITE THESE "STORED PROCEDURES" (WHICH I HEAR AVRE *VERY SLOW) TO CREATE THE HTML FOR MY DROP DOWN LISTS

COOMMON MICRO$$$OFT!! MYSQL DOES THIS AND SO MUCH MORE. GOSH AND IT HAS SOOO MANY LESS "FOREIGN KEEY" ERRORS TOO.

CAAANT U STEEAL THEIR CODE LIKE YOU STOLE MAC OS X CODE TO MAKE WINDDOWS XP?? I NEED TO USE SQL SERVER CAUSE EVERY ONE LAUGHS AT ME WHEN I SAY I USE MYSQL.

I hate how SQL Server doesn't implement by made up version of SQL Ansi 92 that doesn't require a 500 line statement

I hate how SQL Server is somewhat type safe and protects me from ambigious stupid convertions that shouldn't be necessary in the first place

I hate how SQL Server a DBMS, is not a reporting tool like that super cool Access

I hate how SQL Server can't read my mind and determine what sorting order I prefer for each set

I hate how SQL Server doesn't let me write stupid code because I know nothing about set theory.

I hate how SQL Server doesn't fix my stupid design that uses surrogate keys like ID and vendor specific features like Identity. Even worse, I hate how SQL Server doesn't have a filter for stupid prefixes that help establish my entity is a table (tblIamStupid). What is next, tblIamStupid.IntMyID?

I hate how SQL Server doesn't let me write syntactically incorrect dynamic SQL which shouldn't have been written in the first place. I also hate, how if do something like "Select MyCol from @Table", it can't figure out ahead of time what @Table will be because it is a parameter which may change with every call...

I hate how that SQL Server doesn't implement my made up version of Ansi 92. I specially hate, why it can't figure out stupid SQL like "Select @TableName.@ColumnName from @TableName".

I really hate that I took the time to write this for a newb who will never understand any of this.

WHERE LTRIM(tblTable.tblTable_colMonthList) LIKE '%JAN%'
takes forever because it is doing a table scan. The leading % in %Jan shuts off the use of the index. Try:
WHERE LTRIM(tblTable.tblTable_colMonthList) LIKE 'JAN%' then the index will be used.

If you do not want Vermont in the table more than once then you need to either make the column it is in the primary key or make the "Vermont" column UNIQUE. The ID buys you nothing except the ability to join tables on integers which is much faster than joining on strings.

You could solve all you date sorting issues if you used the DATETIME datatype.

This list is uncannily reminiscent of the MySQL gotchas list http://sql-info.de/mysql/gotchas.html - many of these deviations from standard SQL being furiously defended by MySQL fans sounding rather like the purported author of this article...

Great stuff, Jeff.
You write on some pretty esoteric subjects, so I surprised there are so many morons reading your blog; I figure they'd be weeded out by the level of intgelligence of the content.
*sigh*

Hi, someone in the comments here asked about using TRUNCATE for shortening the tablename... but this is not the correct syntax!
You have to use "DROP Table Orders_For_February" instead, this is the final solution and a proven work around in SQL Server!
Good luck

This comment doesn't make a lot of sense. If you design your database to be properly NORMALIZED, you wouldn't be storing "JAN, FEB, MAR" in one column. Learn how to NORMALIZE your tables and it will make your life a lot easier.

MS didn't make this complicated. It's a standard, mathematically-proven concept that has been around since Dr. Codd introduced the Relational Model.

2. Datatype conversions!

Using VARCHAR for everything is very poor strategy. If you have a column that's supposed to hold only INTEGER values, but use a VARCHAR, how do you keep people from entering "ZDFGEH34" in it?

Different Data Types and conversions are a standard in any language. Additionally, SQL Server has some implicit conversions; although it's best to tell SQL Server exactly what you want. After all, you probably learned a long time ago that computers can only do *exactly* what you tell them to do. They used to call it "GIGO" - Garbage In, Garbage Out.

By the way, what do you get when you add "A" and "1"? Is it "B"? Or is it "A1"? Probably depends on whether you're using your VARCHARs to represent hexadecimal numbers or hard text. Unfortunately SQL is only as smart as the developer. For every person who wants "12" + "5" to equal "17", there is someone else who just wants to concatenate the strings.

3. Uh .... Formatting?

Uh... If you haven't figured it out yet, SQL Server is not a presentation platform. It is a data storage and retrieval platform; what we often refer to in the biz as the "back end". You can write functions to do the formatting for you, or you can do it on the "front end", as God and ANSI intended. After all, if your SQL Server is located on a box in the next state, how do you properly right-justify or center the data using a non-fixed-width font at the server? Keep in mind that your SQL Server might have different display settings than your workstation. Are you going to pass in the various required hardware settings with each query? Query Analyzer is a developer's tool, not an end-user database access application. (REF: "front end", "back end")

4. Sorting?

Really simple. Add an "ORDER BY" clause to your orders. If you want SQL Server to *know* that results are to be sorted by Last Name/First Name without telling it, set up a CLUSTERED INDEX. Otherwise, how will the next user get a result set ordered by ADDRESS? Work location? Date of Birth??? Unfortunately having the options to bring the data back in ANY ORDER means you have to actually type in "ORDER BY Lastname, Firstname". P.S. - You can copy and paste the ORDER BY clause I just gave you to avoid all that tedious typing.

Oh yeah, that months out of order thing is one of those great benefits of storing ALL your data as VARCHARs instead of doing it the RIGHT WAY.

5. The IN() operator never works!

IN works just fine. It does not split up lists, like it appears you want. There are plenty of ways to do that though; if you PROPERLY NORMALIZE your data that is. But it sounds like that's not really an option for you anyway.

6. Foreign Keys Constraints !

It's called DRI (Data Referential Integrity), and it's built into SQL Server.

7. Primary Keys don't work!

LMMFAO. You need to use the NATURAL KEY, which would be StateName or StateAbbreviation in your "tblStatesTable" (REF: Redundant Department of Redundancy). Set your PRIMARY KEY on the NATURAL KEY. Study up on the differences between NATURAL and SURROGATE KEYS.

8. S-Q-L is S-L-O-W !!!

LMMFATFO. It's SLOW because you're using LIKE '%JAN%' in your query. It's SLOW because the WHERE clause below cannot use an INDEX. It's SLOW because you did not properly NORMALIZE your data.

Just for comparison, pull out a phone book, and locate every last name entry that begins with "JOH" (i.e., "JOH%"). Now locate every last name entry that has "TL" anywhere in it (i.e., "%TL%"). Which one will take you longer? SQL Server is only as smart as the developer.

This is all the more ridiculous because you name your tables "tblTable" (how redundantly redundant) and your columns tblTable_colMonthList (extreme, over-the-top, excessive redundantly redundant redundancy).

9. Cryptic Error Messages!

That means that you don't have an Order in the Orders table to match the row you're trying to put into the Order Details table. Really simple stuff. Your GROUP BY problem is caused because you're using aggregate functions and not specifying the correct columns in the GROUP BY. The Error Messages are for Developers, and they make perfect sense; although you could always make your own error messages. Look it up in Books Online sometime.

You're trying to truncate tables in the MASTER database? Are you on medication?? Bill Gates could probably afford to buy bad developers brain transplants; but why in the world would he?

10. Table and Column referencing!

Look up Dynamic SQL sometime. It's called sp_executesql or EXEC. There are a bazillion ways to dynamically build SQL statements, but they're very dangerous. I'd be wary of letting anyone who TRUNCATES Master database system tables write dynamic SQL against my databases. Geez.

INSERT works just fine. And you can modify the design of your tables with ALTER TABLE. But then again if you need to dynamically alter your tables it's a pretty good sign that you don't know what the heck you're doing anyway. A properly NORMALIZED database makes SELECTING the data easier, and alleviates the need for DYNAMIC SQL. SQL Server doesn't really need to address this, since Database Design 101 usually does a pretty good job of addressing it. For those who didn't sleep through it anyway.

I can't believe people even remotely thought this was real. Maybe the opening statement, but the rest was so tongue in cheek I just about bit mine off.

This was hilarious and is getting revitalized due to a posting in Database Daily! The comments are the best part. People are showing either a) their lack of understanding or b) their lack of a sense of humor.

Who's been reading my diary? ;-) Yep and I bet you as soon as we all get settled into our nice comfy workarounds, some clever person will figure out how simple it is to fix these 'features' and we'll all be up in the air again :-(

The replies were almost as good as the original post. A coworker and I laughed out loud reading the them. I can't believe some people actually thought you did not know what you are talking about and tried to give you bullet points on what you were doing wrong. Hilarious. With some luck this might get fixed with 2005???!!! LOL

I know the article is tongue in cheek but I just had to comment on the first item in the list.
As for SQL being difficult - try setting up stored procedures on IBM's DB2 and you will want to kiss the SQL developers!

Your list sounds just like it came out of the mouth of an MS Access front end developer whose back end SQL Server database I support! I'm tempted to forward it to her but I don't think she'd understand that it was a joke! How about starting a list on the top 100 things I hate about MS Access?

Ummm, I think you missed the biggest problem of all. I can't type stuff into this stupid SQL Server. I have this idiotic Query Analyzer (can you say DOS circa 1985?) and I SELECTed all my rows, but when I click in the cells in the bottom window it won't let me type over the text! And no Fill Down? How am I supposed to work? I can't even insert rows and columns! You can't expect me to always type in "update theTable set name='Joe Smith' where name = 'Joe Baker'" Sheesh! Excel is way better.

I totally agree with you. I have done the exact same thing you have for most of ur 10 points of disapointment. I too created my database with nothing but varchar, but was able to get a little bit more out of the database when I changed every column to a SQL-Varient. Although this helped I took it one step farther and took all my tables and just converted them into spreadsheets in excel. I know have an amazing database system totally in excel but the only thing is this, if I may ask? How can u get the information out of excel and back into the application the users are using? Although the excel satisfies my reporting needs...the actual application only has data 3 months old :(

This list is a good start on some of SQL Server's short comings. However I feel you should have mentioned the lack of security in the product. As a company standard we set all connections to have dbo (ie disallow basic operations)privileges but it never works properly. We've been hacked over and over. This really is a short coming in the product that needs addressing. I thought Microsoft were focussing on security these days but it seems they skipped it in SQL. Perhaps SP1 will fix this.

Change you requirements so that the people type what they want, how they want to see it. For GUI interface install sql server enterprise manager on everyone’s computer in the office to give them a free visually stunning gui upgrade.

4. Sorting.

Oracle has the same functionality. This problem was addresses above when you renamed you columns 1 thru to 12, now your columns will come out in the proper order.

5. The IN() operator never works!

Easy mistake to make, SQL server doesn’t understand @var as you would expect. The correct syntax is IN (@list).

6. Foreign Key Constraints

You need to have a computer with multiple computer chips to have the computer put the new rows in at the exactly the same time. Otherwise if your have an older computer you can just disable it

EXEC sp_MSForEachTable 'ALTER TABLE ? NOCHECK CONSTRAINT ALL'

7. Primary Keys don’t work!

Use secondary keys

8. S-Q-L is S-L-O-W !!!

Sounds like you have the older computer without the multiple computer chips.

9. Cryptic Error Messages !

I can always find help from forums, blogs and other types of web-sites by Googaling (google.com) the error message.

Brilliant! Couldn't have said it better. BTW - I find that regularly truncating all of my tables cuts way down on system overhead and really improves performance. Why oh why doesn't MS do this for you? :oP

I hate how sql server never gives me the answers my boss wants! Every time he comes up with a new speech or idea, he has me query the dtabases to come up with some statistics to support his ideas....

Well, this database is sooooo stupid that it always comes out with the result proving that my boss is a total idiot! How in the world could that be? I mean, he is "The Boss", right? The database is there to validate what he wants to be true, right?

Well, SQL Server sucks! From now on I'm just going to go back to the old fashion way.... make it all up!

Cryptic error messages... well at least they give us a phone number to call when SQL gives an error message.

I live in Dallas and am happy to notice that the phone number is a local Dallas number (Area code - 214). But they still need some work on their customer service.
The other day I got a SQL timed-out error, with a phone number prefixed to that (214 something something). I called up that number, but the lady on the other end was totally ignorant about SQL server and was in fact quite rude. I suppose MicroSnob still have a long ways to go in their customoer service department.

I am an Oracle guy (OCA/OCP) but somehow i got a job related to MS sql server. so am now downloading the 150 day trial version.

What really cracked me up by reading some of the comments in here is that they took it seriously and tried to reason/or give some suggestion. BUT some of these suggestions are wrong as well LMAO !!

Especially, changes from .....LIKE"%JAN%" to ....LIKE"JAN%" would not shut the indexed column so that the search would be faster. HAHAHAHA

Know about the mechanics of the index usage in the machine level. E.g. Oracle uses RORWID for index, which is about 10 consecutive letters. first 3 letters contain info about the db host, following letters contain table and tuples. It don't matter whether you use % in the front or at the end, because these columns are already 'indexed' in the level of data blocks(segments or extents), which is pointed by ROWID. they don't even know what '%' is. Keep in mind that clustering and indexing are created in the machine level.

PS: but I gotta love this sql server. dang i hope there are many overlaps between oracle and sql server, so far i see only lots of differences thou based on my research - like sql server sucks, Oracle rules.

I hate how you cant just fucking double click on the tables to open them. WHYYYYYYYYYYYYYYY!!!!!!!!!!!!!!!! And why is it that the open table option isn the first option on the list when you right click. Fuck that is dumb. Bill gaits is an arsehole.

Excellent, The things that galls me, and I realise that a number of these posters do not have English as a first language, but the more absurd the response; the more the idiots didn't get it; the more shoddy the grasp of grammar and language constructs are.

10 things I hate about dumbass coders.
1. No sense of humour
2. No sense of humour
....
Yes they ARE all the same

Not really that funny. The bigger issue is that SQL server 2005 does really suck. At least compaired to SQl 2000, IBM Db2, or Oracle. One issue is how easy it is to crash. (It does recover very fast though) SQL now just dies when I try to put in bad data.

Yep, I put in bad data on purpose. I need to make sure that bad data does not kill the system. It kills SQL sever. (Read: the developers will have to spend more time ensuring that external data is perfect) The fact is, that SQL server does not post very good error messages. ( Nor does ADO.NET ) The error messages that I have seen are good. But when the server dies, and spits out no error message(s), that is bad.

I really laughed my ass off. Seriously, you should not be using SQL at all. Make your tables in Notepad or so. This stupid SQL stuff is only created to enable Micro$oft to sell more crap to the world!!

Dude you got to learn SQl .......FAST................
And i am telling you "DO NOT REVEAL YOUR NAME HERE"
COZ then WE all will be sending you the '1'+'1'='11' Award.
(And thats Not An ipod Nano)........NOT IS very important here,,
i knw u are missing a lot of referential integrity..
well,
best of luck.

This was the very first post I read from Jeff... Even tho I have read all the other posts and personally I have learned new things about SQL programming, etc., I still picture Jeff as a fat loser that pretends to know something about SQL while he is struggling with some 500-line select statement in his not-even-first-normal-form tblTabTable_Table Tables

Guess the first impression do counts =)

I still laugh at your post Jeff, and love the reply from "Kane" that's the best IMO.

The real issue is: Why is there so much HATE for SQL Server. It's only software. Perhaps you have spent too much alone time with your computer. I strongly recommend getting out more often. Go for a walk, get together with some friends, or perhaps even get yourself a puppy. Go enjoy a sunrise. Joining a yoga club may also prove beneficial. Lose the stress imposed by technology.
Ignorance is bliss.

Nice blog but you do not want to know how many of our customers come in with such a 'designed not-relation database' and than ask Us to 'just have a little professional peek at their database and fix the few things that could be better'..... :-)

i don't know about you guys, but i don't like sql server one bit. i tried installing it on my NES and it wouldn't work, even when i took the CD out and blew on it and put it in while holding the 'reset' and 'power' buttons at the same time! anyways, i don't care much, zelda kicks sql server's a$$ any day!

I'm a SQL2000 MCDBA. I hate SQL but it has nothing to do with SQL itself. I'm burnt out and am changing carreers, not to mention that I've been downsized for the second time in 6 years. I think if you do your homework you'll find that SQL Server is a bargian, and for the money you have more functionality than you will ever use in a DBMS. Good luck to all of you with this...because I'm so done with going home so stressed that my hair hurts.

I've been on sqlteam.com several times, but this was the first time I've read anything from you to my knowledge. I initially thought that this was some moron with a beef about MS that posted this, and that you were subsequently going to address and destroy his comments. I laughed harder when I read Mike C's post. Funnnny stuff!

To desparateI think you just misused the truncate verb. You need to include the keyword table between "truncate" and the "tablename". That should do the trick. But still, SQL Server is trash. And I'm using 2005. It's worse because there are new things the bosses would like for us to use. I am telling them that there is no use to try the new features because they don't like the result sets of the old queries.

Also, To Jeff, (the original poster). I'm with you, man. I heard Microsoft is generating so much heat over SQL Server's hard to use features that it is the actual cause of Global Warning. MS does not care about the environment or that we live in the 21st century. They try to make SQL Server so hard so they can pretend like all the smart people work for them and the rest of us are just stupid. But the real stupid people are the ones that made SQL Server so hard to use. So many rules and error messages. Man, I'm going to forget about databases and take a job making something like cookies (not those java things either), just like peanut butter or chocloate chips. We would all be better off to quit storing, sorting, retrieving data. We load it and then the managers say it's useless. We make reports and they don't like them. But I made some cookies and brought them to work and all the managers were so much happier than when I run a query and I'm less frustrated, too, becuase I understand what the oven means when the bell goes off. And it's really easy to set the timer for 20 minutes. And I can watch Oprah while they are baking. Bill made a stupid mistake when he tried to make a database system. There already was a database system, a filing cabinet worked for grandma. When the world catches on there won't be any more databases and we can all just relax and watch Oprah.

I'm glad I read the comments first! Sadly, it's entirely possible that a person would seriously say all of those things. As I was reading, I thought, "Maybe MS excel would work better for him ..."

Damn funny, Jeff S.!

For some reason, it reminds me of something said to me when I was explaining the complexities and issues with programming some kind of functionality (I don't remember exactly what). "Whaddaya mean? It's a computer ... it does what ya tell it to, right?"

yes that blog entry is exactly what I needed now. Very very great. So much truth (there are people who really think so) with so much sarcasm, rarely I laughed out so loud.

For everyone who thinks this blog entry is meant seriously:Not later than: "WHERE LTRIM(tblTable.tblTable_colMonthList) LIKE '%JAN%'" should the fact would be clear: this can't be meant seriousely.No programmer would write so innefficient code, I think.

What a great spoof! I was absolutely rolling on the floor laughing with tears in my eyes and clutching my aching gut while gasping for the occasional breath of air between laughs. Then, even though I knew it was a spoof, I read your link about it being an experiment... and I laughed even harder because some people actually didn't realize it was a spoof!

this is the funniest thing i've read on the internet, LOL. can't believe there r knobs like Kane and vlado out there who not only took it seriously but tried to teach good old jeffi a few things about SQL (not very accurate the teachings i must say LOL)

the funniest comment was by this moron called madhavan "One shoud read this blog and all the comments and finally post their opinions. I appreciate this blog, knowledge comes from both this blog and from comments by some people who posted some good points". its like he's realized the great truth about SQL from this blog, LOL. another knob chetan wants jeff to learn SQL fast.... OMG ! these people need to look for their sense of humour , wherever they have lost it...awesome post dallasdave " Cryptic error messages... well at least they give us a phone number to call when SQL gives an error message.

I live in Dallas and am happy to notice that the phone number is a local Dallas number (Area code - 214). But they still need some work on their customer service.The other day I got a SQL timed-out error, with a phone number prefixed to that (214 something something). I called up that number, but the lady on the other end was totally ignorant about SQL server and was in fact quite rude. I suppose MicroSnob still have a long ways to go in their customoer service department. " LOL. can't wait for jeff's next "social experiment", will be equally funny i'm sure..

gotto mention KENAMBROSE. rotflmao .that dumb ass can't know a joke when he c's one and he handles billion dollar deals for his frim,LOL " So sad that people try to use databases without understanding the most basic concepts.

u people dont no how to use the sql server facilities or options based on ur requirements....Just think about the team who has developed this server[By putting there extreme knowledge ]......made it for every one to use this.....thank the people who are involed in this server.

u people dont no how to use the sql server facilities or options based on ur requirements....Just think about the team who has developed this server[By putting there extreme efort ]......made it for every one to use this.....thank the people who are involed in this server.

multiple values in one column how to select?REGULAR EXPRESSION or Good database design

2. Datatype conversions! !!!!!!!!!!!

Actually the best part in SQL server is converting datatypes it is very easy to use

you said that you use varchar for every thing, and if you want to add two numbers like "12" and "5" -- it thinks it's "125"well Duh!!!!if you stored it as characters it will deal with it as characters and it will do the normal concatenation for the string any beginner programmer who doesn't use sql server will know that, if you saved the number or retrieved it as int or other number (store it as number or cast the string into number) formats guess what 12 + 5 = 18 in other meaning'12' + '5' = '125' ==> string + string = concatenated string 12 + 5 = 18 ==> number + number = the sumRead CAST() in MSDN

3. Uh .... Formatting?thank you very much for mentioning it, now you officially approved you are 100% beginner in DBMS. the formatting part is dealt with presentation layer not DBMS part | | |

after reading Kane post how he replied and your reply against him I knew don't need to waste my time.I will save it for some one who knows DBMS not on just a beginner

Well typically someone likes Oracle or SQL Server because they have more experience on one vs. the other. Let's face it, you can get used to using just about anything. Well I can tell you as a person who has 10 plus years on both Oracle and SQL Server... SQL Server really does suck. Let's not even bring up MySQL which is a total joke, yet wonderful at it's price point...FREE. I remember when SQL Server was cheap. At least then you could tolerate it.

So I appoligise in advance to all you SQL Server lovers out there who have little to no Oracle experience. At least you can take comfort in the fact that your ignorance of Oracle is bliss.

Actually, SQL Server is free, too (at least the Express editions, which is more than most people need anyways). If you're going to need to do things like data mining and business intelligence, then it really boils down to three options -- SQL Server, Oracle and Teradata. Then it's a question of how much money you have to blow. SQL Server comes with a much better price tag all around in enterprise situations.

And yes, I've spent many years with PL/SQL. I actually prefer their BI platform to Microsoft's. However, I do recognize the value in both. It seems Microsoft has invested a bit more time in usability while Oracle has invested a bit more time in functionality. That being said, they are both great platforms, and I'm really looking forward to testing the improvements in BI with 2008 (parallelism), but I have to think that SQL Server wins in the long run.

12/23/2008 3:11 AM | Some One can not add, with that said I thought this post was amusing and some of the heated comments hilarious. I caught on to the Humor prior to reading the comments...This is an Old post, but still good humor for late night reading.

Looks like "Some One" needs a lesson in humor. Dumbass should be fired for obvious jokes flying a mile high over his head...

To Jeff: Congratulations on a job well done. I would like to add that COMPLETELY flattening out all table data to one single massive table with lots of nulls is the REAL man's way to go. All the columns should be labelled as key, tag, value1, value2, value3, value4, etc, for the max number of columns allowed in sql server... I think it is around 1000? I call it the uber-EAV-table-management-system.

Just a single clustered index on the most common column value.........And watch your performance FLY!!!

And results of queries without an ORDER BY clause are not returned unsorted "on purpose." It's not as though the server randomizes the output. The results are unsorted simply because they happen to not be sorted

SQL doesn't highlight it properly though, which they really need to start doing

Another thing I hate about SQL Server is that it forces you to store your data in TEXT columns if your rows are over 8k. Hello, this is 2009; 8k is no longer a lot of data. With about half the tables we create we end up having to store all of the data as text, which is really slow to query.

Thank you, thank you, thank you, Jeff!! The "Top 10" list was an instant classic and the ensuing posts are priceless. Is there any way you could have known you'd get these kinds of responses? impossible! but i'll give you credit anyway jsut because you sparked off an internet classic.

this post needs a NSFW waring. your coworkers will think your insane for busting out laughing in the middle of a quiet office!

A couple things. I am a MySQL guy, so I totally sympathize with the fact that SQL blows, but I have to take exception to a few details on your list (sorry if someone else already said this--I didn't read every previous post).

Firstly, the first thing you hate about SQL syntax being too difficult? Well if you have a column value that is equaled to "OCT,FEB,MAR" you are violating the FIRST NORMAL FORM of SQL. If you design schemas on a clear violation of the Normal Forms of course your queries are going to be monstrous!

Secondly, you talk about how your queries get really long and that sucks. Well, I hate to break it to you, but its because you use VARCHAR for everything. Of course "12" + "5" = "125", just like "twelve" + "five" = "twelvefive". It's string concatenations. Everthing's a string, remember?

Thirdly, if cryptic error messages in SQL Server annoy you, you might just wanna quit being a DBA. Every distro, especially SQL Server and MySQL have oft cryptic error messages.

Finally, I will cut you some slack on the "S-Q-L is S-L-O-W" : ) . Yes, SQL Server is slow. A faster table format does come to mind though...MyISAM anyone, hint hint. (Cough MYSQL Cough).

After I read through the first few items, I was thinking to myself, “What? Is this guy nuts???” By the time I got number 4, I was laughing my head off. #7 (Primary Keys don’t work) was the killer app for me as I read my way through the rest of the list. Then I got to the comments and really started to howl. Even after it was “outed” as a joke, people continued to give advice and/or disagree with certain “facts”. I laughed for a good 15 minutes on this and I totally agree with the comment about showing this to a perspective hire to see what they think. Thanks for the laughs and great applause!

1.Date function is limited on mssql.Mysql have lot of date function.This is very important.Now i know why mssql person create varchar for everything.2.Yes inserting is dam pain.Why mysql so easy.3.Php need third party library to connect with mssql.that's idiot.

What's funny is that I was so pissed today about truncation on import that I typed this in, "sql server what is the fucking point of on truncation global" and I got this wonderful post that showed me I'm not the only one. haha.. Fantastic. :)

Pure Genius. How can people still be commenting the Jeff knows nothing with all these comments, and the fact that surely no one is stupid enough to actually take what is written in the article as serious...?

Geez, I guess we're gonna need to mandate laugh tracks for all the dumbfucks who can't discern a joke when it's sittting (quietly) in their lap. I guess satire is an acquired taste. The original post was good (thanks, Jeff), but the comments are the BEST. I.e. those that don't get the joke and try to "help" or rant based on their own ignorance AND those who got the joke and craftily adorned it with new layers. E.g. the not-so-helpful Dallas phone number displayed in error messages.

As someone else posted - AFWATISAF (A fool with a tool is still a fool).