I just want to add that in a real life situation you wouldn't do this mass merge. It is fraught with unseen dangers, such as variables being in different tables, different types, many to many merges etc. Normally you should know your data well, and be able to pick out data items only when needed.
... View more