sql

sql

SELECT + JOIN

I learned SQL (basic and quite advanced stuff) at the univerity a few years ago. I’ve been using SQL commands quite often; it’s difficult to imagine an application or a web page without a database in the back-end.

Recently, I’ve discovered I remember little about using JOIN command in SELECTs. There are a few types of JOINs; however, I’ve been …

Summary of Communities to Communities (C2C) 2009 Conference

C2C is a history now. I attended .NET stream and one session on SQL. The conference as a whole was very interesting, well organised, and basically developing. It was a Polish conference so most sessions were conducted in Polish but there were a couple of speakers from abroad too, and they spoke in English.

Basically I’m happy I had a …

SQL: CONVERT to DATETIME

I’ve heard that SQL Server developers happen to have problems with CONVERT function when try to obtain a value of datetime type. Recently, I’ve had that problem during a Data Transformation Services (DTS) package implementation.

One of the task in that package was “Transform Data”, which transferred data between a source and destination. To retrieve that data, I used SQL …

TSQL – How to select multiple rows into a single row

I spend too long on finding the solution for this problem…

Basically I had a table which looked like this
table-9146579

What I wanted was to select all as one row as a set of items separated with a comma, where an item was ‘id: name’. The items had to be sorted by the id. So the result was supposed to …