IIF in SQL Server 2012
Now you can use IIF in SQL Server 2012 instead of CASE (again this only if you have 2 possible values that you want to evaluate) –This will return Apple SELECT IIF(‘APPLE’ = ‘APPLE’, ‘Apple’, ‘Banana’)…
Now you can use IIF in SQL Server 2012 instead of CASE (again this only if you have 2 possible values that you want to evaluate) –This will return Apple SELECT IIF(‘APPLE’ = ‘APPLE’, ‘Apple’, ‘Banana’)…
In SQL Server 2005, normally when we do paging we need to use CTE or nested SELECT Statement, but in SQL Server 2012 we can use OFFSET and FETCH to do the paging Let’s start of…
One of the new TSQL feature in SQL Server 2012 is TRY_CONVERT, basically it’s a function that will return null if the object passed is not compatible with the expected casting. In earlier version of SQL…
I found some interesting article to share in regards of joining the UDF into your join which ends up in executing the UDF as many as number of records being joined to. The solution is to…
The default template in SQL profiler doesn’t trace the dynamic SQL executed by the stored procedure. In order to trace the Dynamic SQL, you need to turn on these 2 options in your tracing profile SP:stmtstarting…