Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/sql/85.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
SQL-向输出值添加10%_Sql_Magento_Attributes_Copy - Fatal编程技术网

SQL-向输出值添加10%

SQL-向输出值添加10%,sql,magento,attributes,copy,Sql,Magento,Attributes,Copy,我有以下SQL查询: INSERT INTO ry_catalog_product_entity_decimal (entity_type_id, attribute_id, store_id, entity_id, value) SELECT entity_type_id, 290, store_id, entity_id, value FROM ry_catalog_product_entity_decimal WHERE attribute_id = 65; 这是将Magento属性从一

我有以下
SQL
查询:

INSERT INTO ry_catalog_product_entity_decimal
(entity_type_id, attribute_id, store_id, entity_id, value)
SELECT entity_type_id, 290, store_id, entity_id, value
FROM ry_catalog_product_entity_decimal
WHERE attribute_id = 65;
这是将Magento属性从一列复制到另一列。“290”是从“65”复制的属性。我想知道如何在“65”中增加10%的价格,并在“290”中反映出来

谢谢

INSERT INTO ry_catalog_product_entity_decimal
(entity_type_id, attribute_id, store_id, entity_id, value)
SELECT entity_type_id, 290, store_id, entity_id, ((a.value * .1) + a.value) as value
FROM ry_catalog_product_entity_decimal a
WHERE attribute_id = 65;