RE: [sqlite] Update using multiple tables

2004-01-06 Thread Williams, Ken
> -Original Message- > From: [EMAIL PROTECTED] > > Maybe something along the lines of this could work. There's > probably a more > elegant method than this: > > UPDATE output > SET stop=stop+1 > WHERE ROWID = > (SELECT output.ROWID >FROM output, tokens, >WHERE

Re: [sqlite] Update using multiple tables

2004-01-06 Thread Derrell . Lipman
"Williams, Ken" <[EMAIL PROTECTED]> writes: > Hmm, I'm not sure whether I can use that in this context. My actual desired > query is: > > sqlite> UPDATE output, tokens >...> SET output.stop=output.stop+1 >...> WHERE output.sentence=tokens.sentence >...> AND

Re: [sqlite] Update using multiple tables

2004-01-06 Thread Kurt Welgehausen
Look at the docs for INSERT and consider using INSERT OR REPLACE with a SELECT clause. - To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]

RE: [sqlite] Update using multiple tables

2004-01-06 Thread Williams, Ken
Hi Derrell, thanks for the response. > -Original Message- > From: [EMAIL PROTECTED] > > How about something like this: > > UPDATE table1 > SET field23 = (SELECT field42 >FROM table2 >WHERE condition); Hmm, I'm not sure whether I can use that in

[sqlite] Update using multiple tables

2004-01-06 Thread Williams, Ken
Hi, Is it possible in SQLite to update a table using information from another table? Something like the "UPDATE ... FROM" syntax in Postgres, or "UPDATE table1, table2 ..." syntax in MySQL is what I'm looking for. If not, can someone suggest a workaround? -Ken