Msg 244 and Msg 245 come from converting a value to an incompatible data type, often with CAST or ISNULL. Examples of both, and why ISNULL casts to the first type.
Explaining a Database to Non-Programmers (It Won’t Play Your Flash Movie)
Explaining a database to non-programmers is a real skill. Here’s my old flash movie story and the plain comparisons that work in any meeting.
SQL SERVER – Convert Text to Numbers (Integer) – CAST and CONVERT
How to convert text to integer with CAST and CONVERT, whether they fail on alpha-numeric values (yes), and how to pull only the numbers from a string.
CONCAT_WS: Keep NULL and Empty Strings Separate
CONCAT_WS joins values with a separator, but NULL and empty strings have different effects. These examples keep the original fields beside the combined text and byte length.
LAST_VALUE: Set the Window Frame for the Final Row
LAST_VALUE changes with its window frame. Compare implicit and whole-partition frames, order tied rows and preserve a final NULL.
BIT_COUNT: Count Set Bits Without Changing Integer Width
BIT_COUNT counts active positions in a typed value. Keep integer width visible and distinguish a missing mask from a zero count.
SQL SERVER – Definition, Comparison and Difference between HAVING and WHERE Clause
I asked every candidate the difference between HAVING and WHERE clause, and none got it right. HAVING filters groups, while WHERE filters individual rows.
SQL SERVER – Comparison : Similarity and Difference #TempTable vs @TempVariable
#TempTable and @TempVariable both live in tempdb, but they differ in scope and purpose. Their similarities and differences, explained side by side.
SQL SERVER – 2005 Comparison SP_EXECUTESQL vs EXECUTE/EXEC
SP_EXECUTESQL vs EXECUTE/EXEC in SQL Server 2005: what they share for dynamic SQL, like late compile and variable scope, and how they differ.










