Thanks both - modified the code for my example but it failed :( I'll keep at it and see if I can get my head around it.
Paul www.sandersonforensics.com skype: r3scue193 twitter: @sandersonforens Tel +44 (0)1326 572786 http://sandersonforensics.com/forum/content.php?195-SQLite-Forensic-Toolkit <http://sandersonforensics.com/forum/content.php?190-SQLite-Recovery> -SQLite Forensic Toolkit http://sandersonforensics.com/forum/content.php?168-Reconnoitre - VSC processing made easy On 12 October 2014 21:18, Igor Tandetnik <i...@tandetnik.org> wrote: > On 10/12/2014 4:03 PM, Paul Sanderson wrote: > >> Is this possible just using SQL select type statements? >> > > With sufficiently recent SQLite version, you can do something like this > (untested): > > with recursive path as ( > select id, previousid, location from mytable where id=6 > union all > select id, previousid, location > from path join mytable on (path.previousid = mytable.id) > ) > select * from path; > > -- > 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