score:2

Accepted answer

Since you made it clear that you are trying to update a column in another, you need to utilize an update statement, not an insert. I went ahead and edited the answer.

Try This:

UPDATE inland SET lt_dispatch_level = obs.named_lt_dispatch_level 
FROM obs WHERE obs.created_at = (SELECT MAX(created_at) 
FROM obs) AND inland.cartodb_id = 1

The query should return you with the latest row.


More questions

More questions with similar tag