Fixed SQL script for once