Add quote to the SQL query generated by GetCurrentStatus function