I think this might be beyond the ability of SQL - but there are cleverer people on here than me, so I might be wrong :)
Lets say we have a table Create table (id integer primary key, previousid integer, location text) previousid contains a pointer to ID or 0 for no previous id, so for instance we might have 1, 0, texas, 2, 1, new york 3, 2, washington 4, 0, tampa 5, 0, atlanta 6, 5, charleston Given a starting ID I'd like to create a new table which followed the references back, so wiit starting id 6 my table would be 6, charleston 5, atlanta with starting id 5 it would be 5, atlanta and starting id 3 it would be 3, washington 2, new york 1, texas, Is this possible just using SQL select type statements? Thanks _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users