Clark Christensen wrote:
So, finally, the question:  What might the SQL look like to retrieve a list of 
predecessors for 'PC1_v1.3'?  Sure, I could prepare a stmt in the app (Perl), 
and walk the chain in some fashion. Is this result even possible using plain 
SQL?

Clark,

SQLite does not support the recursive SQL queries that could be used to do this kind of processing. So there is no way to follow a chain in SQL. You can convert the problem into pattern matching by having each record store the path along the chain in that record. This is really a variation of the SQL tree problem. I have previously posted a sample implementation of this materialized (or stored) path method at http://www.mail-archive.com/sqlite-users@sqlite.org/msg13225.html

HTH
Dennis Cote

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to