Skip to content

Update-Queries with multiple tables do not work properly #11

Open

Description

@Neokil

I just ran into an issue with one of my queries and it seems sqlvet cannot handle this sort of Update-Query:

UPDATE activities u
	SET ref_id = c.ref_id
FROM activities c 
WHERE u.object_id = c.object_id 
	AND c.event_type = 'create'
	AND u.event_type = 'update'
	AND u.ref_id <= 0

The Error-Message is

ERROR: table `u` not available for query

Currently I just ignore this one query using the //sqlvet:ignore but it would be nice to have it fixed.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions