Multiple row update?

Post Reply
amitic
Posts: 14
Joined: Fri Jul 02, 2010 10:57 pm

Multiple row update?

Post 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
amitic
Posts: 14
Joined: Fri Jul 02, 2010 10:57 pm

Multiple row update?

Post 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?
User avatar
John
Site Admin
Posts: 2597
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

Multiple row update?

Post 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.
John Turnbull
Thunderstone Software
Post Reply