On Tue, 14 Feb 2017 15:06:16 +0100
Marek Wieckowski <[email protected]> wrote:
> UPDATE test
> SET value = value + 100 *(
> SELECT i.value
> FROM test i
> WHERE i.whereField = test.whereField
> ORDER BY i.orderField = test.orderField
> LIMIT 1
> );
>
> Error: no such column: test.orderField
There are other errors, too. The update is nondeterministic and
nonstandard. Does this not serve the purpose better?
UPDATE test
SET value = value + 100 * (
SELECT min(i.value) -- or max, or something
FROM test i
WHERE i.whereField = test.whereField
);
--jkl
_______________________________________________
sqlite-users mailing list
[email protected]
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users