How to check if a table exist in Sql Server

As data analyst, one common thing to do in our scripts, specially for creating a table is to check if that table already exist. There are some methods to check if a table exist in Sql Server. Demo Table We are going to create a table and a temporary table for testing purposes. This is going to create … “How to check if a table exist in Sql Server”

Read More

How to set a default value for an existing column in Sql server

How to set a default value for an existing column in Sql Server Updating a default value for an existing column is not as simple as execute a query, you have to consider a few things before doing it. We are going to see how … “How to set a default value for an existing column in Sql server”

Read More

How to Convert a Month Number to a Month Name in Sql server

How to convert a month number to a month name in Sql Server Sometimes you have a month number,probably this number was extracted from a date, you want to display that month number as amonth name. On the following article we are going to show … “How to Convert a Month Number to a Month Name in Sql server”

Read More

How to import csv in Sql Server

How to Import a CSV file into a Sql Server table. There are several ways to import a csv file into Sql Server. For this article we are going to explore different methods using Sql Server Management Studio (SSMS). We are going to use the … “How to import csv in Sql Server”

Read More

How to concatenate rows into string in Sql Server

Methods to concatenate rows into a Sql Server string. Sometime ago I came with a similar problem where I had to concatenate multiple rows into a String, this for sending a file to other system in a CSV format (Comma separated values). These kind of tasks … “How to concatenate rows into string in Sql Server”

Read More

Common Table Expressions (CTE) In Sql Server

How to use Common Table Expressions (CTE) in Sql Server Common table expressions (CTEs) are temporary structures, that are similar to sub-queries with the exception that they can self reference; they are defined as objects that are visible only to the statement that defines them. … “Common Table Expressions (CTE) In Sql Server”

Read More

How to Insert into table using Select

How to insert into a table using Select in Sql Server While getting ready for Sql Server test 70-761 I was wondering why do I need to insert values from one table in another. That question got answer over the last 3 years while working on different SQL data analysis … “How to Insert into table using Select”

Read More

Dynamic data masking on MSSQL

How to dynamic data masking on Sql Server While working on an external database I noticed something interesting, I was looking date in a transaction table, all of its values where ‘1900-01-01’. I start wondering what was happening there, until I realized that I didn’t … “Dynamic data masking on MSSQL”

Read More

Sql Server – Split column with delimited string into multiple columns

How to split a column with delimited string into multiple columns Long time ago I found that data might come in many different formats, mostly related with the data source, Cellphone Numbers, User Names, addresses are some examples of data that commonly comes in delimited format. … “Sql Server – Split column with delimited string into multiple columns”

Read More

How to round in Sql Server

How to round a number in Sql Server If you want to start learning how Sql server works, Rounding numbers in Sql is a good startpoint. 1. Rounding in Math Rounding in Sql is mainly based on rounding math concept. This consist in going to … “How to round in Sql Server”

Read More