Hi Guys
Firstly:
Is it possible to import two columns from an excel sheet into two new columns in a mysql database?
I would like to import new product codes(prodcode2) and pricing(prodsupplyprice2) into these two columns and then set up a query to do the folowing...
I need to compare original product codes column(prodcode) with the new imported product code column(prodcode2) and if the same code is present anywhere in the two columns, update the products price(prodsupplyprice) with the newly imported price(prodsupplyprice2).
This becomes challange because most of the time the product codes are not lined up next to each other and are unordered.
I figure you need to use a SELECT statement and MATCH statement to select the matching codes and maybe reorder (prodcode2) to line up with (prodcode)
From there you just use the UPDATE statement to change the prices.
How I see it:
SELECT * FROM products WHERE MATCH (prodcode) AGAINST (prodcode2);
How? This doenst work, I have tried combinations and sometimes get a FULLTEXT error..?
Then, need to somehow reorder corrisponding codes next to each other... How?
Then
UPDATE `products` SET `prodsupplytprice` = (`prodsupplyprice2`) WHERE `prodsupplyprice2` > 0 ;
Any help on this would be greatly appreciated and could save me HOURS updating prices... or if there is a better way of doing this please let me know :)
Many Thanks
Marc