SQL: Fix end of file