Fix an error with some sql statements on multiple lines