Sql batch validation