Create the procedure and call it passing in the source databse name, target database name, source table name, and target table name.
NOTE: if the source table doesn't have a identity column or primary key, then the join statement from the output will have to be altered.