What would be the proper way to write a query like this?
insert into productcategory(Fkproductid,fkcategoryid)
((select DISTINCT pg.fkproductid from productgroupdetail pg
INNER JOIN temp t ON pg.sku = t.sku),64)
I'm basically attempting to insert the fkproductid of all sku's in temp table + the fkcategoryid of 64 into the product table.
productcategory has 2 fields, both int(10): fkproductid, fkcategoryid
temp has 1 field, sku(varchar(20)
productgroupdetail has sku(varchar(20)), fkproductid(int(10))