SQL Script now correct