Skip to main content

Optimizing individual "update or insert" statements

  • November 16, 2017
  • 0 replies
  • 6 views

natalia_2017

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?