Few days ago, I have received email from users asking question :How to run 64 bit SQL SERVER 2005 on 32 bit operating system?
SQL SERVER – UDF – User Defined Function to Extract Only Numbers From String
Following SQL User Defined Function will extract/parse numbers from the string. CREATE FUNCTION ExtractInteger(@String VARCHAR(2000)) RETURNS VARCHAR(1000) AS BEGIN DECLARE @Count INT DECLARE @IntNumbers VARCHAR(1000) SET @Count = 0 SET @IntNumbers = '' WHILE @Count <= LEN(@String) BEGIN IF SUBSTRING(@String,@Count,1) >= '0' AND SUBSTRING(@String,@Count,1) <= '9' BEGIN SET @IntNumbers =…
Read MoreSQL SERVER – 2005 – Silent Installation – Unattended Installation
Silent SQL Server 2005 Installation is possible in two steps. 1) Creating an .ini file The SQL Server CD contains a template file called template.ini . Based on that create another required .ini file which includes a single [Options] section containing multiple parameters, each relating to a different feature or…
Read MoreSQL SERVER – SP Performance Improvement without changing T-SQL
There are two ways, which can be used to improve the performance of Stored Procedure (SP) without making T-SQL changes in SP. Do not prefix your Stored Procedure with sp_. In SQL Server, all system SPs are prefixed with sp_. When any SP is called which begins sp_ it is…
Read MoreSQL SERVER – 2005 Reserved Keywords
Microsoft SQL Server 2005 uses reserved keywords for defining, manipulating, and accessing databases. Reserved keywords are part of the grammar of the Transact-SQL language that is used by SQL Server to parse and understand Transact-SQL statements and batches. It is not legal to include the reserved keywords in a Transact-SQL…
Read MoreSQL SERVER – Search Text Field – CHARINDEX vs PATINDEX
We can use either CHARINDEX or PATINDEX to search in TEXT field in SQL SERVER. The CHARINDEX and PATINDEX functions return the starting position of a pattern you specify. Both functions take two arguments. With PATINDEX, you must include percent signs before and after the pattern, unless you are looking…
Read More