Improved SQL check error.