Thanks Keith

That's what I'd tried with my first attempt but naturally it didn't work.

Why is it that SQLite does not support a FROM clause in an update statement?

On Sat, Jan 16, 2016 at 10:07 AM, Keith Medcalf <kmedcalf at dessus.com> wrote:
>
> Of course, if there was a FROM clause for UPDATE it would be as simple as:
>
> UPDATE target
>    SET resource = source.resource
>   FROM source
>  WHERE source.id = target.id
>    AND source.resource IS NOT NULL;
>
> This is semantically the same as:
>
> SELECT ...
>   FROM target, source
>  WHERE source.id = target.id
>    AND source.resource IS NOT NULL;
>
> except that instead of returning rows, where a row would be returned the 
> update is performed.
>
> Now if SQLite could do an UPDATE FROM that would be really nice.
>

Reply via email to