delete old pend title check sql