Every once in a while, as part of a consulting project I need to investigate all the different columns and datatypes used within the tables. Often in order […]
Monty Hall Simulation using T-SQL
The first time I heard about the Monty Hall problem was while watching TV. The host of the TV show had presented the problem as you typically […]
Query to quickly profile a column
Every once in a while, there is a need to profile columns in a table. typically as part of a redesign, the below query help quickly profile some […]
Part 2:- Learning T SQL for beginners – Datatypes
In the previous post I talked about what Microsoft SQL Server programming language (T-SQL) is about. I also explained what a table is and what basic information is requires. In this […]
Part 1:- Learning T SQL for beginners- SQL, Tables and Nulls
Learning SQL is easy when you have a good understanding of the basics. Everything else is based on the basics and it’s been the same since RDBMS (relational […]
A simple script to decapitalize Column names
The above script can take column names for all tables in the database and provide the rename script to only capitalize the first letter.
Simple Function to capitalize a string
Recently I was required to write a function that would capitalize the 1st letter in every word. This is a fairly common requirement and I felt that there […]
Boolean Hell – Missed rows when grouping in SQL
I was recently asked about the concept of Boolean hell and thought it would be a good post to discuss. Most database professionals should be familiar with the […]
How to identify conversion issues using TRY_CAST ()
A common issue with the ELT process is that you find out errors after they have been loaded. This is usually not any issue unless the database specifically […]
Using Snippets in SSMS
A little know and used feature by database developers is Snippets. Database developers understandably do not use this feature because we have long been accustomed to using prebuilt […]