[sqlite] UPDATEing a SELECTion in one shot

2010-07-21 Thread jose isaias cabrera
Greetings and salutations. I believe this is possible, but I can not seem to get the syntax from the site. I have these 3 commands and 3 different steps that I want to put into one: 1. result1 = SELECT sum(price) FROM table1 WHERE subProjID = 24; 2. result2 = SELECT sum(price) FROM table2

Re: [sqlite] UPDATEing a SELECTion in one shot

2010-07-21 Thread Pavel Ivanov
If the following can be considered as one step then do it like this: BEGIN;      UPDATE LSOpenSubProjects SET price = (SELECT sum(price) FROM table1 WHERE subProjID = 24),       udate = now WHERE subProjID = 24;      UPDATE LSOpenProjects SET price = (SELECT sum(price) FROM

Re: [sqlite] UPDATEing a SELECTion in one shot

2010-07-21 Thread jose isaias cabrera
Pavel Ivanov willingly and out of the goodness of his heart wrote: If the following can be considered as one step then do it like this: BEGIN; UPDATE LSOpenSubProjects SET price = (SELECT sum(price) FROM table1 WHERE subProjID = 24), udate = now WHERE subProjID = 24;

Re: [sqlite] UPDATEing a SELECTion in one shot

2010-07-21 Thread Kees Nuyt
On Wed, 21 Jul 2010 14:28:12 -0400, jose isaias cabrera cabr...@wrc.xerox.com wrote: Greetings and salutations. I believe this is possible, but I can not seem to get the syntax from the site. I have these 3 commands and 3 different steps that I want to put into one: 1. result1 = SELECT

Re: [sqlite] UPDATEing a SELECTion in one shot

2010-07-21 Thread jose isaias cabrera
Kees Nuyt, out of the goodness of his heart, wrote: On Wed, 21 Jul 2010 14:28:12 -0400, jose isaias cabrera wrote: Greetings and salutations. I believe this is possible, but I can not seem to get the syntax from the site. I have these 3 commands and 3 different steps that I want to put