Skip to main content

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

  • November 16, 2016
  • 0 replies
  • 8 views

Shinil1

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');