Page 1 of 1

Multiple row update?

Posted: Fri Sep 10, 2010 3:58 pm
by amitic
For some reason update on a (ram) table with no search condition only updates one row, although the texis documentation clearly states:
"The record or records being modified are found by using a search condition. All rows that satisfy the search condition are updated. If no search condition is supplied, all rows in the table are updated."

As an example, the following code snippet:

<sql "create ram table testtbl(item varchar(50))"></sql>
<sql novars "insert into testtbl(item) values ('item 1')"></sql>
<sql novars "insert into testtbl(item) values ('item 2')"></sql>
<sql novars "insert into testtbl(item) values ('item 3')"></sql>
<sql row "select item from testtbl">
$item
</sql>
----------
<sql novars "update testtbl set item = 'updated item';"></sql>
<sql row "select item from testtbl">
$item
</sql>

outputs:

item 1
item 2
item 3
----------
item 2
item 3
updated item

Any suggestions?
I'm guessing it's something painfully obvious...

Regards,
Aleksandar

Multiple row update?

Posted: Fri Sep 10, 2010 8:37 pm
by amitic
Update:

Just tested this on a regular (ie. non-ram) table and it works as expected.

Any ideas/explanations why it doesn't work on a ram table?

Multiple row update?

Posted: Sat Sep 11, 2010 1:49 pm
by John
It appears to be an issue with the RAM table when a row is updated it reorders the records and thinks it is at the end of the table.

If you contact support they can provide an better estimate of a fix date.