Jump to content

SQL Query to Update Specific Price


Recommended Posts

I want to update existing Specific Prices based on the Wholesale/Cost Price for items that are active. Below is an example of the final calculation.

This is the Excel calculation for when I am manually determining the Fixed Price:

I believe I will need to use the following Database tables/fields:


Can someone let me know if my query is correct or if I should make any changes?

UPDATE ps_Specific_Price
INNER JOIN ps_Product
ON ps_specific_price.id_product = ps_product.id_product
SET ps_Specific_Price.Price = CEILING((ps_Product.Wholesale_Price*0.2)+ps_Product.Wholesale_Price)+3
WHERE ps_Product.Active= 1

Thank You!!


Share this post

Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

  • Create New...

Important Information

Cookies ensure the smooth running of our services. Using these, you accept the use of cookies. Learn More