Please take this survey to help us learn more about how you use third party tools. Your input is greatly appreciated!

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

Can't find what you're looking for? Search the Vertica Documentation, Knowledge Base, or Blog for more information.