W
Warrio
Hello!
How is it possible to create ONE and only ONE sql query that inserts values
only if this value does not exist into the table.
I can do it by code by first searching for the value, and if the result is
null, then execute the insert query:
rs = "SELECT Field1 FROM Table1 WHERE Field1 = 3"
If rs.RecordCount <=0 then
con.excute "INSERT INTO Table1 (Field1) SELECT 3"
End If
Is it possible with one query to check if the record does not exist, if not
then insert, otherwise insert nothing.
Thanks for any suggestion.
How is it possible to create ONE and only ONE sql query that inserts values
only if this value does not exist into the table.
I can do it by code by first searching for the value, and if the result is
null, then execute the insert query:
rs = "SELECT Field1 FROM Table1 WHERE Field1 = 3"
If rs.RecordCount <=0 then
con.excute "INSERT INTO Table1 (Field1) SELECT 3"
End If
Is it possible with one query to check if the record does not exist, if not
then insert, otherwise insert nothing.
Thanks for any suggestion.