Usual proviso: BACKUP YOUR PRODUCTION DATABASE FIRST, AND TRY THIS ON YOUR DEVELOPMENT DATABASE BEFORE APPLYING TO YOUR PRODUCTION.
Code:
-- this will do for your products with only 1 variant
update product
set xmlpackage = 'product.simpleproduct.xml.config'
where productid in (
select productid from productvariant
group by productid
having count(variantid)=1
)
-- this will do for your products with more than one variant
update product
set xmlpackage = 'product.variantsindropdown.xml.config'
where productid in (
select productid from productvariant
group by productid
having count(variantid)>1
)
Change XMLPackage name accordingly.