We're Moving!

The Vertica Forum is moving to a new OpenText Analytics Database (Vertica) Community.

Join us there to post discussion topics, learn about

product releases, share tips, access the blog, and much more.

Create My New Community Account Now


Optimizing individual "update or insert" statements — Vertica Forum

Optimizing individual "update or insert" statements

We are switching to Vertica and one of our systems needs to periodically update or insert individual data rows in a Vertica table. If the record with the given key exists, it needs to update the non-key fields. If the record doesn't exist, it needs to insert it. In SQL Server, we used to do that using construct [update ... ] if \@\@rowcount = 0 [insert ...]
I believe Vertica doesn't support\ @\@rowcount or IF statement.
Can you please recommend the most efficient way to implement the same functionality for Vertica tables?

Leave a Comment

BoldItalicStrikethroughOrdered listUnordered list
Emoji
Image
Align leftAlign centerAlign rightToggle HTML viewToggle full pageToggle lights
Drop image/file