Update + Join
Is there a way to do an update + join in Data virtuality?
For example:
With subquery AS ( SELECT genre_id, movie_genre FROM Movie_genres )
UPDATE Movies
SET movie_genre = subquery.movie_genre
FROM Movies AS m
LEFT JOIN subquery on m.genre_id = subquery.genre_id
WHERE Movies.movie_id = m.movie_id;
-
Comment actionsOfficial comment
Hi Paul,
the UDPATE FROM clause is not supported in DV SQL.
There is however a workaround available:
https://support.datavirtuality.com/hc/en-us/articles/360041060931-UPDATE-statement-with-two-tablesWould this work for you?
Best,
Matthias
Please sign in to leave a comment.
Comments
1 comment