Category: Random helpfulness

SQL Education

They always used to tell us that education is important. Education is (They said) key, in fact.  We as a technical community apparently agree with Them, because we’ve devoted countless hours to writing and reading blogs, articles, books, abstracts, bios, and technical sessions. We’ve spent even more hours attending those sessions at user group meetings, […]

We Are TOTALLY Amused: A T-SQL Error

This has to be the best error I’ve ever seen: Msg 195, Level 15, State 10, Line 2 ‘SUM’ is not a recognized built-in function name. Uhm, I’m sorry to contradict you SQL Server, but yes it is. Here’s the code that produced that error: SELECT keyID , SUM(CASE WHEN printDate IS NULL THEN 1 ELSE […]

SELECT INTO and IDENTITY (or, BOL is Sorta Wrong)

I am easily distracted.  Lucky for all of us, I tend to be distracted by cool tidbits in SQL Server Books Online. This time, I was arrested by this little nugget: When an existing identity column is selected into a new table, the new column inherits the IDENTITY property, unless one of the following conditions […]