Re: [sqlite] SQL Update while Stepping through Select results

2008-09-06 Thread BareFeet
> Unfortunately I oversimplified my explanation, and the processing > that is required is somewhat more complex. Perhaps you could give more detail about your data. It seems to me that you should restructure your data so it is "atomic", ie so that each bit of data appears in its own row in a

Re: [sqlite] SQL Update while Stepping through Select results

2008-09-06 Thread Neville Franks
Saturday, September 6, 2008, 10:03:00 AM, you wrote: IT> "Neville Franks" <[EMAIL PROTECTED]> wrote IT> in message news:[EMAIL PROTECTED] >> At present the clm data is a list of one or more numeric id's >> separated by either a space or comma. I need to update this so the >> id's are always comma

Re: [sqlite] SQL Update while Stepping through Select results

2008-09-05 Thread Igor Tandetnik
"Neville Franks" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > At present the clm data is a list of one or more numeric id's > separated by either a space or comma. I need to update this so the > id's are always comma separated. update tableName set field=replace(field, ' ', ',');

Re: [sqlite] SQL Update while Stepping through Select results

2008-09-05 Thread Neville Franks
Hi Igor, Saturday, September 6, 2008, 8:27:01 AM, you wrote: IT> Neville Franks <[EMAIL PROTECTED]> wrote: >> I need to update a column in a set of rows in a table. For each row I >> need to extract the columns value, change it and update the row. >> >> My question is, is it valid to perform an S

Re: [sqlite] SQL Update while Stepping through Select results

2008-09-05 Thread Igor Tandetnik
Neville Franks <[EMAIL PROTECTED]> wrote: > I need to update a column in a set of rows in a table. For each row I > need to extract the columns value, change it and update the row. > > My question is, is it valid to perform an SQL UPDATE inside a > sqlite3_step() loop. Yes. > Finally is there a b

[sqlite] SQL Update while Stepping through Select results

2008-09-05 Thread Neville Franks
I need to update a column in a set of rows in a table. For each row I need to extract the columns value, change it and update the row. My question is, is it valid to perform an SQL UPDATE inside a sqlite3_step() loop. Or put another way will subsequent calls to sqlite3_step() behave correctly foll