|
|
-
|
|
I just learned about IIF function provided by SQL Server 11 CTP3, which takes 3 arguments, first argument is condition. If condition returns true, it returns second argument. If condition returns false, it returns third argument. It was already part of ...
|
|
-
|
|
1.FIRSTVALUE : Returns first value based on partition and order by clause 2.LASTVALUE : Returns last value based on partition and order by clause...
|
|
-
|
|
PERCENTILE_CONT() : Computed by linear interpolation between values after ordering them. Like in example for the four values of group, it will be calculated as per following formula,...
|
|
-
|
|
LEAD() and LAG() are interesting functions introduced in SQL Server 2011 CTP3, which will be used to get previous and subsequent rows values,
LEAD() : Used to access data from a subsequent row in the same result set without the use of a self-join.
LAG(...
|
|
-
|
|
I am going to demonstrate something new about analytical functions comming in SQL Server Denali CTP3 version. So let look on those functions and elaborate in details. Following are the summary of those new functions, ...
|
|
-
|
|
While you performing fetch operation using remote objects with linked server when it having XML column, it raise above such error "Xml data type is not supported in distributed queries"...
|
|
-
|
|
Sometime we need to create Default values for columns after creating a tables, so as per need I am sharing a script to add Default to existing column on table....
|
|
-
|
|
We are mostly creating primary key on column while creating tables, But sometime we also need to have it after creating table or on existing table as per need, So i am sharing the script to add primary key on table....
|
|
-
|
|
As per requirement in custom logic we need to require CTE (Common Table Expression) sometime like for the hierarchy, to find duplicate and remove data or for some other stuff. Recently i have used CTE within CTE for one logic and maxrecursion option as ...
|
|
-
|
|
I would like to share the script to find open active transactions and sessions at database level, here you can find the same which capture for active transactions initiated by users only. This will results for all the databases but you can make a databa...
|
|