If you have a Sharepoint service pack1 content database which you want to move to SP2 environment all you have to do is to run a stsadm command..
stsadm -o addcontentdb -url http://new-site-address -databaseserver your_server -databasename
This will upgrade the SP1 content database to sP2. This is very handy when you want to upgrade a 32-bit SP1 sharepoint 2007 to Sharepoint 2010. First you move it to a sp2 farm by using this command, after upgrade is successful then you detach/attach it again to sql 2008 & sharepoint 2010 backend.