Hello,

I can get a select result like the following: (SELECT ID,Changes FROM
mytable WHERE somecondition;)

ID        Changes
-----------------
1          10.0
1          10.3
1          12.2
2          31.0
3          1.02
3          4.9

how can I get the above result sets into the following format (columns
'Changes1','Changes2',... are all from 'Changes')

ID        Changes1    Changes2    Changes3     (limits of 5)
--------------------------------------------
1          10.0            10.3            12.2
2          31.0
3          1.02            4.9


I have got a method that works (I think) by first do a SELECT getting
DISTINCT id values and then foreach of these ID I do another SELECT to get
the Changes values and then just massage the display.

Is there another way of doing this by using a single SQL query?

any help or hints will be very much appreciated.
Thanks


-- 
Tony




-- 
MySQL General Mailing List
For list archives: http://lists.mysql.com/mysql
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to