Tag Archive for 'TSQL'

Is Distinct A Synonym To Order By In MS SQL Server ?

1 Comment

This afternoon, I was chatting with Antoine Gémis about T-SQL, and this subject came on the table.
He was asking if, in my opinion, using both a distinct and an order by in the same statement would make the query worst due to the fact that distinct is already performing a sort on his own.
Working mostly [...]

My TSQL Challenge 10 Pivot-UnPivot Solution

4 Comments

This is the query I sent to the TC team. I published it when I sent it, but they prefer to keep solution secret as long as the closure date isn’t in the past, which I can understand.
I had fun using PIVOT and UNPIVOT operators to reduce the query size.
PIVOT / UNPIVOT syntax isn’t part [...]

TSQL Challenge #10, How To Process Horizontal Sorting

Add a comment

Beyond Relational have released their last T-SQL Challenge, it’s already number 10 !
French version has been translated on Antoine Gémis’s blog.
Jacob Sebastian and the TC team is really active and involved in helping people to improve themselves with SQL and T-SQL.
For this challenge they offer a Free Training Webcast for those who have problems in [...]

Another TSQL Challenge : How To Handle Breaks !

Add a comment

Beyondrelational published their new TSQL Challenge #9, and as usual Antoine Gémis translated it in french.
They have taken redefined the goal about those challenges which I think is a very nice move.
The goal of TSQL Challenges is to help people enhance their SET based query writing skills.
Most of the times, a SET based query performs [...]

Challenges !!!

1 Comment

TSQL Challenge
 
Last month I answered about a SQL Challenge from Antoine Gemis (french here). My solution wasn't very nice, I used a flaw in the data to provide an easy query with basic outer joining.
As the only challenger, I won it !
Antoine's told be about some regular TSQL Challenges (meaning SQL Server) but i didn't [...]