" Live as if you were to die tomorrow. Learn as if you were to live forever.. "
- Mahatma Gandhi

Use SQLCMD to Export SQL Query Result to a CSV File

Posted on November 24th, 2015 by Ratan Sharma

I recently had a requirement to purge older data from one of the database. Well yes, a single Delete query can do that easily. But we needed first to export those old data to CSV file, and then purge them from different tables, so incase needed we can import them back. There are many ways […]

Extended Properties for Documenting the SqlServer Database

Posted on November 24th, 2015 by Damodaranaidu Betha

Documentation of SqlServer Database using Extending Properties Most of the programmers just create the DB objects with good naming conventions and dont provide the extra information like ‘why / what’ info to them. This works fine till no new programmer, who doesnt know anything about the application DB, joins them. If the naming convention is not […]

Using =null instead of isnull

Posted on November 24th, 2015 by Chittaranjan Nahak

What is the result for this query although there null in address column SELECT EMPLOYEENAME,EMPLOYEEADDRESS FROM  EMPLOYEE WHERE ADDRESS=NULL Ofcourse will get a result set with no datarows Write a query like SELECT EMPLOYEENAME,EMPLOYEEADDRESS FROM  EMPLOYEE WHERE ADDRESS=NULL will get a result set with zero rows of data although there is rows having value null […]