My data looks like this:
HTML Code:
coursetitle                 period   
spanish                         01
math                            02
internship                    0304

I want it to look like this:

HTML Code:
coursetitle                 period   
spanish                         01
math                            02
internship                      03
internship                      04
Note: period is a string variable

Does anybody know some clever STATA code for achieving this?