Following query will run respective on today’s date. It will return Last Day of Previous Month, First Day of Current Month, Today, Last Day of Previous Month and First Day of Next Month respective to current month. Let us see how we can do this with the help of Date Function in SQL Server.
SQL SERVER – UDF – Function to Parse AlphaNumeric Characters from String
Following function keeps only Alphanumeric characters in string and removes all the other character from the string. This is very handy function when working with Alphanumeric String only. I have used this many times. CREATE FUNCTION dbo.UDF_ParseAlphaChars ( @string VARCHAR(8000) ) RETURNS VARCHAR(8000) AS BEGIN DECLARE @IncorrectCharLoc SMALLINT SET @IncorrectCharLoc…
Read MoreSQL SERVER – 2005 – List all the database
List all the database on SQL Servers. All the following Stored Procedure list all the Databases on Server. I personally use EXEC sp_databases because it gives the same results as other but it is self explaining. ----SQL SERVER 2005 System Procedures EXEC sp_databases EXEC sp_helpdb ----SQL 2000 Method still works…
Read MoreSQL SERVER – Explanation SQL Command GO
GO is not a Transact-SQL statement; it is often used in T-SQL code. Go causes all statements from the beginning of the script or the last GO statement (whichever is closer) to be compiled into one execution plan and sent to the server independent of any other batches. SQL Server…
Read MoreSQL SERVER – Download Microsoft SQL Server 2005 System Views Map
The Microsoft SQL Server 2005 System Views Map shows the key system views included in SQL Server 2005, and the relationships between them. It is available to download from Microsoft Site. It can be printed and mounted at Office Depot or Kinko’s. Download SQL SERVER 2005 System Views Reference :…
Read MoreSQL SERVER – 2008 Katmai – Download Datasheet Final from Microsoft
Few interesting thing about Katmai. SQL Server “Katmai” will provide a more secure, reliable and manageable enterprise data platform. SQL Server “Katmai” will enable developers and administrators to save time by allowing them to store and consume any type of data from XML to documents. SQL Server “Katmai” provides a…
Read More
