Hello,

I am try to combine the following 2 views - vtag and vparent_closetag

sqlite> select id, level, line from vtag;
id|lev|line
id      level   line
1       0       <parent1>
2       1        <leaf1>
3       1        <parent2>
4       2         <leaf2>
5       1        <parent3>
6       2         <parent4>
7       3          <leaf4>
8       2         <leaf3>

sqlite> select id, level, line from vparent_closetag;
id      level   line
1       0       </parent1>
3       1        </parent2>
5       1        </parent3>
6       2         </parent4>

desired result-

order   level   line
1       0       <parent1>
2       1        <leaf1>
3       1        <parent2>
4       2         <leaf2>
5       1        </parent2>
6       1        <parent3>
7       2         <parent4>
8       3          <leaf4>
9       2         </parent4>
10      2         <leaf3>
11      1        </parent3>
12      0       </parent1>

Any ideas to achieve this?

-Shane
_______________________________________________
sqlite-users mailing list
sqlite-users@mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to