Finished the SQL String for the application.