On 19 Jun 2017, at 12:2, Keith Medcalf wrote:
> insert into filters (absid, filter_name, enabled, filter_order)
> values (null, 'Untitled filter', 0, coalesce((select max(filter_order) from
> filters)+1,1))
>
> If you want the filter_order by filter_name then you would
insert into filters (absid, filter_name, enabled, filter_order) values
(null, 'Untitled filter', 0, ((select max(filter_order) from filters)+1)
On Mon, Jun 19, 2017 at 11:46 AM, Tim Streater wrote:
> I want to insert a new row in my table, and while doing so setting a
>
noʎ ɟı
> -Original Message-
> From: sqlite-users [mailto:sqlite-users-boun...@mailinglists.sqlite.org]
> On Behalf Of Tim Streater
> Sent: Monday, 19 June, 2017 04:47
> To: SQLite Users
> Subject: [sqlite] Error message on insert
>
> I want to insert a new row in m
I want to insert a new row in my table, and while doing so setting a column to
one more than the maximum value of that column, thus:
insert into filters (absid, filter_name, enabled, filter_order) values
(null, 'Untitled filter', 0, max(filter_order)+1)
However I get "Error: no such column:
4 matches
Mail list logo