mickeystuewe.com - Mickey's T-SQL Ponderings | Sharing my tidbits of knowledge on T-SQL, SSRS,

Example domain paragraphs

One of my favorite presentations to give is called, “ Changing Your Habits to Improve the Performance of Your T-SQL. ” After giving this presentation in Austin, TX this past January, I had one of my students contact me. He saw in one of my demonstration how bad cursors can perform. He wanted to see if his stored procedure could be written using set theory.

He has an application that can only accept 3 data types (NVARCHAR, NUMERIC, and DATETIME), and as all normal database schemas do, his database has more than 3 data types. He needed to identify which column had data types that could not be used and determine which of the 3 data types could be used for that column. The actual conversion was handled by another process, so the information to do the conversion was stored in a table.

The Cursor Approach

Links to mickeystuewe.com (2)