Re: [sqlite] Simple Addition Question

2006-03-17 Thread John Stanton
This works - char *stmnt = "UPDATE systab SET sys_state = " "(SELECT sys_state FROM systab WHERE item_id = 'NEXT_BATCH_ID') + 1 " "WHERE item_id = 'NEXT_BATCH_ID';"; Deepak Kaul wrote: I have an addition question. Is is possible to increment a value in an update statement? If so how

Re: [sqlite] Simple Addition Question

2006-03-17 Thread Martin Engelschalk
Hello Deepak, your example is valid SQL. I have tried it and it works in sqlite (of course). Martin Martin Deepak Kaul wrote: I have an addition question. Is is possible to increment a value in an update statement? If so how would the sql statement be written? For example Table addition

[sqlite] Simple Addition Question

2006-03-17 Thread Deepak Kaul
I have an addition question. Is is possible to increment a value in an update statement? If so how would the sql statement be written? For example Table addition with the following columns unique_id, count I want something like the following UPDATE addition SET count = count + 1 WHERE unique_