Hello all,

 

Let's say I have this schema:

 

CREATE TABLE Table1 (FileID INTEGER NOT NULL, FileOrder INTEGER);

 

And I need to go through it at change FileOrder so that it becomes
FileOrder of the next (or previous) FileID and that's FileID FileOrder
becomes current (to put it in words - swap them around with either next
or previous values), effectively moving them up or down an ordered list.

 

I am thinking about using an UPDATE trigger (so, I update one of
FileOrders to become the next one, and the trigger should update the
next one to become the current one) - would that be the best solution if
I was to try to do it using only SQL? Of course I can do it in the
program, but I think that doing it inside SQLite would be a bit faster?
Is there any other way to do this using SQL?

 

Thanks in advance for your ideas/suggestions :)

 

Regards,

 

   Dennis

 


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

Reply via email to