What's the right SQL Statement - TechRepublic
Question
January 19, 2009 at 09:58 PM
jeffreyalejo

What’s the right SQL Statement

by jeffreyalejo . Updated 17 years, 5 months ago

I got one(1) table with the following data:

Table Name: MyTable

ID Date Name
==============================
1 2008-08-31 James
2 2008-08-31 Jack
3 2008-08-31 Gregory
4 2008-08-29 James
5 2008-08-29 Jack
==============================

Now, how can I make it look like this:

Name Date1 Date2
=================================
James 2008-08-31 2008-08-29
Jack 2008-08-31 2008-08-29
Gregory 2008-08-31
=================================

Basically, I’m grouping it by the field Name.

This discussion is locked

All Comments