rhdpre Posted July 9, 2012 Share Posted July 9, 2012 (edited) Hola, Vi uno de esos hilos donde explicaban cómo actualizar precios via SQL (del que nada sé) Decía: /*Donde x es el porcentaje que querais incrementar el precio.*/ UPDATE ps_product SET price = price*(x%); Me interesa el "incremento porcentual" pero me da error de sintaxis; Pongo lo siguiente(quiero incrementar un 5%): UPDATE ps_product SET price = price(5%) (y lo "ejecuto" en la pestaña SQL (Ejecutar la(s) consulta(s) SQL en la base de datos) (tambien he intentado con el punto y coma final, y sin quitarle es asterisco) ¿Alguien ve el fallo? Un saludo y gracias Edited July 9, 2012 by rhdpre (see edit history) Link to comment Share on other sites More sharing options...
coeos.pro Posted July 9, 2012 Share Posted July 9, 2012 have you try this : UPDATE ps_product SET price = price*(1.05); ? Link to comment Share on other sites More sharing options...
rhdpre Posted July 9, 2012 Author Share Posted July 9, 2012 have you try this : UPDATE ps_product SET price = price*(1.05); ? okay, you made worked thank you very much Link to comment Share on other sites More sharing options...
Recommended Posts