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
"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