Can't create a MySQL query that generates 4 rows for each row in the table it references.

Posted by UkraineTrain on Stack Overflow See other posts from Stack Overflow or by UkraineTrain
Published on 2010-06-04T19:15:43Z Indexed on 2010/06/05 6:12 UTC
Read the original article Hit count: 216

Filed under:
|
|

I need to create a MySQL query that generates 4 rows for each row in the table it references. I need some of the information in those rows to repeat and some to be different. In the table each row stands for one day. I need to break the day up in 6 hour increments, hence the four rows for each entry. I need to create one column which for each day will have '12AM', '6AM', '12PM', and '6PM' values and another column will have the corresponding numeric values calculated for those entries.

Thanks a lot in advance and I will really appreciate any help on this.

© Stack Overflow or respective owner

Related posts about sql

Related posts about mysql