|
|
-
|
|
Data type conversion has been one of the most used features of any programming language. Microsoft SQL Server users are familiar with the two functions: CAST() and CONVERT() and use them regularly, and more specifically, interchangeably. A few months ago, I had written a post comparing the performan......
|
|
-
|
|
Today’s post is part of the series that I am running under the title "Under Appreciated Features of SQL Server". The series has been inspired by Andy Warren's editorial on SQLServerCentral.com. Microsoft SQL Server 2005 was a completely different SQL Server. The internals had changed and ......
|
|
-
|
|
In the previous post we saw a simple example that adds a total line to the end of the query. In this post, let us see a little more advanced example of a query that adds sub totals and grand totals to the result of a query using WITH ROLLUP.
For example, assume that you need to write a query that ......
|
|
-
|
|
I made my previous blog post right before leaving for PASS 2009 Summit. I wanted to write a short summary of my experience at PASS ever since I was back, but a couple of critical work assignments kept me busy for the last few weeks. Flight from New York to Seattle I had a great f......
|
|
-
|
|
This post intends to help TSQL developers get started with PIVOT/CROSS TAB queries. Most business applications will need some sort of PIVOT queries and I am sure many of you must have come across pivoting requirements several times in the past.
Let us say for example we need a result set as foll......
|
|
-
|
|
After a small slip-up on the SQL Server Forums, I thought it best to remind myself (and others) of the importance of using Sargable predicates in WHERE clauses.
Definition: In relational databases, a condition (or predicate) in a query is said to be sargable if the DBMS engine can take advantage of......
|
|
-
|
|
Microsoft SQL Server is home to many myths and legends, and I have developed an interest in knowing about them. It is really a very interesting exercise to know about these myths, and prove them incorrect if the situation permits. The Myth One such myth is that a table name in a Microsoft SQL Serv......
|
|
-
|
|
You can do conditional aggregation like SUM(CASE WHEN .. THEN 1 ELSE 0 END),....etc to find a count for a particular match. This type of conditions are useful when you want to write a CROSS-TAB/PIVOT Query. You can also make use of COUNT(CASE WHEN .. TH...
|
|
-
|
|
TRUNCATE Command belongs to____________Options:1. DDL2. DML3. Both (DDL & DML)4. OthersANSWERE____________Condition: Select appropriate answers from the options and if non of the answer is suitable for the question or if you want to explain with ...
|
|
-
|
|
I have posted a post on Different ways to find End of the month where I showed you five different ways to find out last day of a month. Here is the analysis on how long each method takes to executeI am not using any physical table to store dates and the...
|
|