Thanks. Ummmm, how would I execute this merge?

Also, I've found that my script works fine for users with admin privileges, but not regular users. Is there a way around this?