Following script will create common separate values (CSV) or common separate list from tables. convert list to table. Following script is written for SQL SERVER 2005. It will also work well with very big TEXT field. If you want to use this on SQL SERVER 2000 replace VARCHAR(MAX) with VARCHAR(8000)…Read More
Following Users Defined Functions will convert list to table. It also supports user defined delimiter. Following UDF is written for SQL SERVER 2005. It will also work well with very big TEXT field. If you want to use this on SQL SERVER 2000 replace VARCHAR(MAX) with VARCHAR(8000) or any other…Read More
Before doing any .Net coding in SQL Server you must enable the CLR. In SQL Server 2005, the CLR is OFF by default. This is done in an effort to limit security vulnerabilities. Following is the script which will enable CLR. EXEC sp_CONFIGURE 'show advanced options' , '1'; GO RECONFIGURE;…Read More
Following user defined function returns number of weekdays between two dates specified. This function excludes the dates which are passed as input params. It excludes Saturday and Sunday as they are weekends. I always had this function with for reference but after some research I found original source website of…Read More
Download SQL Server Management Studio Keyboard Shortcuts I have received many emails appreciating my article Query Analyzer Shortcuts and requesting same for SQL Server Management Studio Keyboard Shortcuts. I see frequent downloads of the PDF generated by SQLAuthority for the same on server. There is original article on MSDN site.…Read More
Lots of people do not know that following command can be very helpful to clear your memory caches of SQL Server. I have often seen people restarting their entire system to clear the memory caches.