Hi all, I have a situation where the data in a table has to be transposed. I have a table having columns id, a_id, a1, a2, a3, a4, ..., an
In the query I need a result similar to a_id a_id a_id 2001 2002 2003 a1 1 2 1 a2 1 5 6 a3 2 7 2 a4 3 9 5 ... .. .. .. an n 1 1 How does a SQL statement of stored proc/function look like to achieve this? Any help is higly appreciated. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/[EMAIL PROTECTED]