Movate Interview Question

They have given 2 sp. You have find the errors in that sp.