Why Normalize Data?

Normalization is one of the most important and basic database principle , why is it that important? So if you are a sql developer and you come across a table in which there are comma separated values and those are to be used to join another table ; what would you do? Parse it one […]

Read more "Why Normalize Data?"

Using a Comma separated column in sql

Use the following :     IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[fnc_GetValuesInColumnFromCSV]’) AND type in (N’FN’, N’IF’, N’TF’, N’FS’, N’FT’)) BEGIN execute dbo.sp_executesql @statement = N’– ============================================= — Author: AASIM ABDULLAH — Description: TO GET VALUE IN TABLE FORMAT FROM CSV INPUT — ============================================= CREATE FUNCTION [dbo].[fnc_GetValuesInColumnFromCSV] ( @csv NVARCHAR(4000) […]

Read more "Using a Comma separated column in sql"

Using a variable in a view

So i came across this problem while writing a view in which the problem couldn’t be solved by using Case statements; i tried to do that using a cursor but hey guess what cursor can’t be used either so this came to me why not use variables ; i hadn’t use it in my past […]

Read more "Using a variable in a view"