combine sql statements to set both pending and started to failure on startup