I am executing this query :

WITH T_item AS 
    (
    SELECT uuid, field_updated_at 
    FROM item 
    WHERE uuid IN 
        ( 
            SELECT DISTINCT item_uuid 
            FROM itemfield 
            WHERE updated_at <= 0 OR value_updated_at <= 0 
        )
    ) 
    
UPDATE itemfield 
SET updated_at = T_item.field_updated_at, 
    value_updated_at = T_item.field_updated_at 
FROM T_item 
WHERE itemfield.item_uuid = T_item.uuid;

This query gives error when sqlite3_prepare_v2 is used to prepare the statement in the code : SQL Error : near "FROM": syntax error

However, it executes successfully on sqlite browser installed in my device on the same database.

What can be the reason about the same?

0

There are 0 best solutions below