Giving correct output during running about SQL not being compiled in