Transact SQL – Drop Temp Table if it it exists

Background Reviewing some Transact SQL Code and saw a code block that works well in exception handling, but can have a bit of side effect in Transact SQL. Code Original Code SQL Explanation When the temp table does not exist, an error is raised. Because the drop table is enclosed in a try/catch block the … Continue reading Transact SQL – Drop Temp Table if it it exists

What datatype is the null value?

Background A few weeks ago, I ran into a Transact SQL problem and I was forced to ask myself why two database objects were not compatible. In the rest of this post, I will share the "foundational"  scenario and try to start answering the question, what datatype is Null.   Scenario Our baseline scenario is to … Continue reading What datatype is the null value?

Technical: Microsoft – SQLServer – Error – “The conversion of the varchar value ‘100000’ overflowed an INT2 column. Use a larger integer column” (Msg 244, Level 16, State 2, Line 355)

Technical: Microsoft - SQLServer - Error - "The conversion of the varchar value '100000' overflowed an INT2 column. Use a larger integer column" (Msg 244, Level 16, State 2, Line 355) Msg 244, Level 16, State 2, Line 355 The conversion of the varchar value '100000' overflowed an INT2 column. Use a larger integer column … Continue reading Technical: Microsoft – SQLServer – Error – “The conversion of the varchar value ‘100000’ overflowed an INT2 column. Use a larger integer column” (Msg 244, Level 16, State 2, Line 355)