i think sql query is started with sql and it was feeded to sql engine, work with removing the sql part at first.