fixed noBatch SQL