This is what I'm doing right now:
Execute a query and check if the date to be inserted already exists in a table.
If date doesn't exist:
Another query will insert the date into the table.
How can these two query be combined?
This is what I'm doing right now:
Execute a query and check if the date to be inserted already exists in a table.
If date doesn't exist:
Another query will insert the date into the table.
How can these two query be combined?
IF NOT EXISTS (SELECT * FROM X WHERE A=B)
INSERT INTO ...
you can put the two statements together into a stored procedure