Re: [sqlite] UPDATE the order of INT fileds

2009-12-22 Thread Simon Slavin
On 22 Dec 2009, at 11:48am, Andrea Galeazzi wrote: > Probably it won't work because ID must be UNIQUE and Name is not. Ah. Okay, pick an arbitrary number, perhaps 999, to use temporarily for the entry that's being moved. Simon. ___ sqlite-users mail

Re: [sqlite] UPDATE the order of INT fileds

2009-12-22 Thread Andrea Galeazzi
Simon Slavin ha scritto: > On 22 Dec 2009, at 10:25am, Andrea Galeazzi wrote: > > >> ID INTEGER, >> Name TEXT >> >> So, for instance, I can have: >> >> 1 Julia >> 2 Eric >> 3 Kevin >> 4 Sarah >> 5 John >> >> Now I wanna move Eric from 2 to 4 in order to yield (by performing a >> series of UPDAT

Re: [sqlite] UPDATE the order of INT fileds

2009-12-22 Thread Simon Slavin
On 22 Dec 2009, at 10:25am, Andrea Galeazzi wrote: > ID INTEGER, > Name TEXT > > So, for instance, I can have: > > 1 Julia > 2 Eric > 3 Kevin > 4 Sarah > 5 John > > Now I wanna move Eric from 2 to 4 in order to yield (by performing a > series of UPDATE of ID field): > > 1 Julia > 2 Kevin > 3

[sqlite] UPDATE the order of INT fileds

2009-12-22 Thread Andrea Galeazzi
Hi, I'm trying to solve this problem: I've got the following table, made up of two fields: ID INTEGER, Name TEXT So, for instance, I can have: 1 Julia 2 Eric 3 Kevin 4 Sarah 5 John Now I wanna move Eric from 2 to 4 in order to yield (by performing a series of UPDATE of ID field): 1 Julia