patched query to use or cluase for create and modify dt