SQL script required

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
11 anos atrás
Evening All!

I normally post this kind of job on a certain freelancers website however i thought I would ask here to help support comunity. THIS IS A SMALL JOB :) Just have no idea how to do it so open to suggestions. Nothing complicated.


Basically we have 9000 products in a clients website. The hard bit has been done. and it wasnt an easy job!

However now we need to update the prices. The SKU doesnt change so now we have a spreadheet with the SKU, List price (old price column), and the new price. (three columns)


The informaiton is all in one table (ProductVariant) so what I need is a script (sql query or similar) that looks for the SKU and when it finds it replaces the old price and new price.


Should be simple :)c ...... i hope! :O

We host on dedicated servers so can access SQL DB on the server ..... or anything on the server.
thanks
Simon
11 anos atrás
Have sent a pm.
11 anos atrás
Are you aware the the built-in product import updates existing records based on SKU?
You would have to export first, then update the spreadsheet, then import.  (This could take a while to import.)
Depending on your needs/frequency, the SQL script might be a better choice
11 anos atrás
Thanks NY,

Actually you ansered part of a question I asked yesterday in that. I had assumed the SKU but wasnt sure. Unfortunately we have 8000 odd products so the export feature doesnt work and just times out.

Also we found that you have to import in 500-1000 lots or it times out.


Having said that. Do you know if you MUST have all of the information on the spreadsheet to import or can you ONLY have the SKU and price.

Also what would happen if there is an EXTRA sku in there (sometimes there suppliers sneak one in :(  -  hence the need for search and replace. Then it should ignore the 'extra' sku's

Thanks for the info

Simon

@blaklab - Have ansered pm thanks
11 anos atrás
You have to have everything except CategoryIds, ManufacturerIds, and Pictures. You still need the column headers, but the cells in the column can be blank.  As a matter of fact, Picture1, Picture2, and Picture3 should be blank - otherwise the system will import duplicate pictures - unlike the Category/Manufacturer Ids, pictures are not checked to see if they already exist.

If by "extra sku" you mean a sku that does not already exist, then that will be created as a new product.
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.