Thanks Igor

Paul
www.sandersonforensics.com
skype: r3scue193
twitter: @sandersonforens
Tel +44 (0)1326 572786
http://sandersonforensics.com/forum/content.php?195-SQLite-Forensic-Toolkit
-Forensic Toolkit for SQLite
http://sandersonforensics.com/forum/content.php?168-Reconnoitre - VSC
processing made easy



On 2 December 2014 at 20:20, Igor Tandetnik <i...@tandetnik.org> wrote:
> On 12/2/2014 2:46 PM, Paul Sanderson wrote:
>>
>> So what I really need is to
>> a) ensure that the ordering of the recursive query is guranteed, i.e.
>> the order follows the ID/parent relationship to the root
>> b) a method of concatenating this in reverse order
>
>
> WITH RECURSIVE rcte AS (
>   SELECT 0 as level, parent, FileName
>   FROM rtable
>   WHERE ID = 510
> UNION ALL
>   SELECT rcte.level + 1 as level, rtable.parent, rtable.FileName
>   FROM rcte JOIN rtable ON rcte.parent = rtable.ID
>   WHERE rtable.FileName <> '.')
> SELECT FileName
> FROM rcte
> ORDER BY level desc;
>
>
> --
> Igor Tandetnik
>
> _______________________________________________
> sqlite-users mailing list
> sqlite-users@sqlite.org
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to