Moves a dataset to the proper merge statement