私はこれをしようとしています:
update aTable
set aField = 'value'
where aTable.Id in (select top 400 Id from aTable order by dateField) .
-- This will run, but it only updates the first id it gets to in the IN clause
またはこれ:
update top 400 aTable set aField = 'value' order by dateField
-- This will not run
しかし、それはPervasiveのV10で動作する必要があります...
同様の回避策でも十分です。
背景として、(アイテムの数(変数))のフィールドを日付フィールド順に並べられた値で更新しようとしています。
これがPervasiveのアップデートヘルプです(そこにTOP予約語が表示されません):
UPDATE < table-name | view-name > [ alias-name ]
SET column-name = < NULL | DEFAULT
| expression | subquery-
expression > [ , column-name = ... ]
[ FROM table-reference [, table-reference ] ...
[ WHERE search-condition ]
table-name ::= user-defined-name
view-name ::= user-defined-name
alias-name ::= user-defined-name (Alias-name is not allowed if a
FROM clause is used. See FROM Clause .)
table-reference ::= { OJ outer-join-definition }
| [db-name.]table-name [ [ AS ] alias-name ]
| [db-name.]view-name [ [ AS ] alias-name ]
| join-definition | ( join-definition )
| ( table-subquery )[ AS ] alias-name [ (column-name [ , column-name
]... ) ]