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


one way to write one time insert script in vertica to avoid duplication while running multiple times — Vertica Forum

one way to write one time insert script in vertica to avoid duplication while running multiple times

Thought of posting this as I was new to Vertica and trying to find how to write it and finally I could do it !!!

 

INSERT INTO My_Table(
 column1
 ,column2
 ,column3

)
SELECT 'My Column1 value','Hi',1 where NOT EXISTS (SELECT 1 FROM My_Table WHERE Column1='My Column1 value');

 

 

 

Leave a Comment

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