-
Split data from one column into two
Hello, is it possible to split data from one column into two, like shown in the link below?
http://sites.google.com/site/janhouse00/sql
Due to my stupidity, my last resort is to have two separate queries, one to fetch the date created, another for date closed, and dump them to some sort of array. However, I thought it can be done with one query, I have been stumbling over this issue for some time. Many thanks
-
janhouse00, it looks like this should work for you:
Code:
SELECT QID
, MIN(LAST_UPDATE) AS CREATED
, MAX(LAST_UPDATE) AS CLOSED
FROM MYTABLE
GROUP BY QID
-
Oh, silly me! Never thought of the min max in the date column. This solution would definitely help, thanks a bunch
Cheers.
-
I like this idea too!
________
Thc
Last edited by sql; 03-06-2011 at 02:16 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
|