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?