|
|
-
|
|
SQL Server 2012 enhanced the `EXECUTE` statement with an additional clause `WITH RESULT SETS` which allows you to convert/alter the columns and data types of the results produced by the `EXECUTE` statement.
Assume that your stored procedure returns an ...
|
|
-
|
|
Often in financial applications, its required to calculate End date of a month. SQL Server 2012 provides a function EOMONTH() to calculate end date of a month.
DECLARE @Currentdate DATETIME
SET @Currentdate = '12/12/2010'
SELECT EOMONTH (...
|
|
-
|
|
This is one of the functions, which has some statistical background.
**Distribution Value:**
A distribution value indicates the possibility of occurance of that value among a group of values.
For Example, when a coin is thrown, it can be head or ta...
|
|
-
|
|
This functions will return columns values from subsequent rows in the same result set without the use of a self-join.
Example:
DECLARE @Users TABLE(
UserID INT IDENTITY,
UserName VARCHAR(20)
)
INSERT INTO @Users (UserNa...
|
|
-
|
|
PERCENT_RANK() function will returns the percentage value of rank of the element among its group.
PERCENT_RANK() function value will be
1. For first element in its group, it will be 0.
2. For last element in its group, it will be 1.
3. For remaining...
|
|
-
|
|
The previous versions of SQL Server never allowed index operations (CREATE, DROP, REBUILD) on ONLINE mode, if the index includes a Large Value Type column (VARCHAR(MAX), NVARCHAR(MAX), VARBINARY(MAX) etc).
Try running the following code in SQL Server ...
|
|
-
|
|
In SSIS Denali 2012, toolbox has been enhanced to provide better experience to users. 2 New categories been added to both control flow toolbox and dataflow toolbox and items has been categorized according to their use.
1. Favorites
2. Common
Show the ...
|
|
-
|
|
Until SQL Server 2012, LOG() function used to support only Natural Log. From SQL Server 2012 onwards, LOG() function used to accept logarithmic value of any base. Now LOG() function will accepts base value as second parameter.
SELECT LOG(10) as R...
|
|
-
|
|
In SQL Server 2012, one of the addition to OVER clause is, ROWS/RANGE Clause. In general, when we apply aggregate functions in over clause, it will apply to all rows in that group/partition. Suppose, if we wants to restrict the number of rows, it involv...
|
|
-
|
|
Often while tuning stored procedures, we will see tables have the "seek" operator. Few times one of reason for slow performance is wrong estimates on number of rows. Because of that, there are more chances that query optimizer choose "SEEK" over "SCAN"....
|
|