How may I create an horizontal view from a tree table
Posted
by
Giuseppe Alfieri
on Stack Overflow
See other posts from Stack Overflow
or by Giuseppe Alfieri
Published on 2014-06-04T19:34:52Z
Indexed on
2014/06/04
21:25 UTC
Read the original article
Hit count: 356
I want to create a view for each tree for each customer of this 3 table structured in this way:
Fields: db_attrib.name, db_attrib.name, db_attrib.name until the last db_tree.id_child = 0
Values: db_attrib_values.value where db_attrib.id = db_attrib_value.id_attrib and so on for each child
And so on for each db_tree.id
This is the link to sql fiddle with the prepared structure:
© Stack Overflow or respective owner