Here are the List of features that are deprecated in Sql server 2008 http://msdn.microsoft.com/en-us/library/ms143729.aspx
I constantly keep querying the Database sometimes for checking the metadata in the DatawareHouse. Lately I realised that have been executing the same long sql statements everyday. So is there a better way of Organising all my Favourite SQL statments or procedures ? This is what I ended up with. Create a Table The table [...]
Ran a Job yesterday to check how the SQL agent Handles the DayLight Savings Created the following Table Created the Following procedure to enter the current Date and Ran the Job every minute from March 28th 2009 22:50 to Mar 29th 2009 3:00 AM Results: There was no 01:00 AM on March 29th !!!!. So [...]
SELECT name, create_date, datepart(dy,create_date) as CreatedDayOfYear, modify_date, datepart(dy,modify_date) as ModificationDayOfYear FROM sys.sql_modules JOIN sys.objects ON sys.sql_modules.object_id = sys.objects.object_id AND TYPE = ‘P’ order by datepart(yyyy,modify_date) desc, datepart(dy,modify_date) desc, name;
Here is the Sql function that will Proper Case any column in a table set ANSI_NULLS ON set QUOTED_IDENTIFIER ON GO create function [dbo].[ProperCase](@Text as varchar(8000)) returns varchar(8000) as begin declare @Reset bit; declare @Ret varchar(8000); declare @i int; declare @c char(1); select @Reset = 1, @i=1, @Ret = ” while (@i <= len(@Text)) select [...]
I was trying to remove the Identity inserts for 4 tables all at once but I keeping getting errors like Cannot remove the Identity insert on table 2 as the table1 already has identity insert on. So after digging into the MSDN I was surprised to see the following lines “At any time, only one [...]
TSQL has improved its assignment Operators in the C language convention. In SQL SERVER 2000 or SQL SERVER 2005 the assignment operators are written as Declare @i int Declare @s varchar(100) set @i = 10 set @s = ‘WORD’ set @i = @i * 40 set @s = @s + ‘PRESS’ In SQL SERVER 2008 [...]
A new feature in Sql server 2008 TSQL is the Single Statement Variable Declaration. What is this? In Sql Server 2000 or Sql Server 2005 the declare statements are written as follows Declare @i int,@j int ,@k int set @i = 100 set @j = 200 set @k = 300 The Above Statement in Sql [...]


