Absolutely cool plugin to repair all posts and images after data-import or when your database is messed up!
The plugin killed the client's godaddy's site - 503 for a half of an hour.
I don't know why but this didn't fix the problems I had with my own posts which had no meta entries at all in the wp_postmeta table.
My final solution that gets around this by extracting the image files from the wp_posts table and then checking if they exist on the local system before adding the required meta data can be found at: http://www.adam-makes-websites.com/discoveries/fixing_messed_up_image_attachments_in_wordpress_that_have_no_postmeta_values
You must log in to submit a review. You can also log in or register using the form near the top of this page.