I am trying to port this line from MS SQL Server to SQLite
IF NOT EXISTS(SELECT 1 FROM EVENTTYPE WHERE EventTypeName = 'ANI Received') INSERT INTO EVENTTYPE (EventTypeName) VALUES ('ANI Received');
It seems that SQLite does not support IF NOT EXISTS or at least I can’t make it work. Am I missing something simple? Is there a workaround?
How about this?
(Untested as I don’t have SQLite… however this link is quite descriptive.)
Additionally, this should also work: