OK, so I'm no big fan of dynamic SQL or cursors, however there are times where they do the job.
Case in point, today I had to restore a database and a bunch of transaction logs. To do this I started by manually restoring the database but because I had a bunch of transaction logs I felt I would feel the time would be better spent writing a quick transaction log restore script. I know this will occur in the future and I like about having the necessary control over the code.