As is often the case in TV police shows, a detective cannot transfer from one agency to another. The process would involve resigning from one and being hired by another. Since the position of detective is not an entry-level one, the officer would need to begin as a patrol officer and then advance to detective.