Created function to quote sql statements