Hello Jay! Assigning the ids outside sql wouldn't be neccessary because I could easily see the predecessor and successors. You are completely right, when you suggest a sql-external solution. For better understanding I should explain my situation a little. My real problem is, that I do all that stuff for my diploma's thesis in computerscience. I'm trying to show the abilities of relational datamodels in a deductive context. I'm trying to implement a rule base in sql that shall provide correct and complete analysis of chess situations as an example for deductive database driven monitoring. Therefor I'm not allowed to use external mechanisms. It has to be implemented completely in sql using views as rules. So every top level analysis is implemented as a cascade of views, which are more abstract and shared by all analysis near the basis and more concrete and specialized to the top level. The top level of views is the users perspective on the system. Additionally I have to implement a frontend gui in Java/Swing with possibilities to load, save and manipulate chess situations in the usual formats....
So, I'm a bit off to real world solutions. I've to take the long and winding road ....;-) (I've already implemented one complete version in a generate and test style, but it does not perform very good if you increase the board size and the number of pieces to let's say 800x800 and 320. So I have to find a new approach, now using the horizon of each piece to reduce the calculations neccessary to get all move possibilities,threat and cover situations.) But thank you so much for your good support and help! And if something crosses your mind to solve the id problem with views in sql please tell me how! -- View this message in context: http://www.nabble.com/selecting-rows-of-the-view-via-its-position-tf1991602.html#a5470487 Sent from the SQLite forum at Nabble.com.