Thursday, May 22, 2008

Confusing @@VERSION?

I was confused when i first ran the SELECT @@VERSION query and saw the result out of that query. Try to run the following query in SSMS:

PRINT @@VERSION
GO
PRINT 'Edition: ' + CONVERT(CHAR(30), SERVERPROPERTY('Edition'))
GO
PRINT 'Product Version: ' + CONVERT(CHAR(20), SERVERPROPERTY('ProductVersion'))
GO
PRINT 'Product Level: ' + CONVERT(CHAR(20),SERVERPROPERTY('ProductLevel'))
GO

Result:-
---------------------------------------------------------
Microsoft SQL Server 2005 - 9.00.3042.00 (Intel X86)
Feb 9 2007 22:47:07
Copyright (c) 1988-2005 Microsoft Corporation
Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 2)
Edition: Enterprise Edition
Product Version: 9.00.3042.00
Product Level: SP2

I have highlighted the confusing part in RED. This is Windows NT Service Pack Level, Not the SQL service Pack Level.

The reason i went to conclusion that the output provided by the query is very detailed one but i guess they missed to include sql server pack infrmation there.[;)]. Anyway we can get that information through SERVERPROPERTY('ProductLevel').

~ Kiran

Sunday, May 11, 2008

Want to download YouTube videos???

There are two very simple ways i see to download YouTube videos.

1. Kiss YouTube way:
If suppose your YouTube URL is something like http://www.youtube.com/watch?v=sdUUx5FdySs. You just need to add word "kiss" in front of the youtube.com in your URI. The page in this modified URL (http://www.kissyoutube.com/watch?v=sdUUx5FdySs) will have the link to save that clip.

2. Keepvid way: http://keepvid.com/
Keepvid is a very good site for downloading videos from any site. On Keepvid's first page, you just need to choose the site you want to download from and copy the link of the page with the video on it and paste it in the textbox provided.

~ Kiran

Friday, May 09, 2008

Car Puzzle!


















Solution:

















~ Kiran

RSS In Plain English

This is really nice video to get to know what really RSS feed means.





~ Kiran

Thursday, May 08, 2008

@@IDENTITY vs SCOPE_IDENTITY() vs IDENT_CURRENT

@@IDENTITY, SCOPE_IDENTITY, and IDENT_CURRENT are similar functions because they all return the last value inserted into the IDENTITY column of a table.
@@IDENTITY and SCOPE_IDENTITY return the last identity value generated in any table in the current session. However, SCOPE_IDENTITY returns the value only within the current scope; @@IDENTITY is not limited to a specific scope.
IDENT_CURRENT is not limited by scope and session; it is limited to a specified table. IDENT_CURRENT returns the identity value generated for a specific table in any session and any scope.

More help on msdn.
~ Kiran

Wednesday, May 07, 2008

Leap Year has not been handled in SQL Server 2008 CTP

SQL Server 2008 CTP installables were not working on this year's FEB 29. I was using SQL Server 2008 CTP on one of my projects and found the above issue. All the installations worked properly on March 1.
~ Kiran