Matthew Stuart Trying to update existing prices and sizes in products table
Mar 14, 2012; 02:30
Matthew Stuart
Trying to update existing prices and sizes in products table
Hi all, I have a table of products (ps_4products), and a table of up-to-date prices and sizes (_import_products). I am trying to replace old content in the table ps4_products with up-to-date content in the _import_products table, but I am getting errors.
I am trying to ask the DB to match on ProductSKU and then replace the relevant info but I am getting this error:
Not unique table/alias: 'ps4_products'
I have no idea what it means though. Please advise.
Here's my query:
SELECT ProductSku, COUNT(ProductSku) _import_products FROM _import_products GROUP BY ProductSku;
UPDATE ps4_products INNER JOIN ps4_products ON (_import_products.ProductSku = ps4_products.ProductSKU) SET ps4_products.ProductPrice = _import_products.ProductPrice; SET ps4_products.ProductWeight = _import_products.ProductWeight; SET ps4_products.ProductWidth = _import_products.ProductWidth; SET ps4_products.ProductHeight = _import_products.ProductHeight; SET ps4_products.ProductLength = _import_products.ProductLength; -- MySQL General Mailing List For list archives: http://lists.mysql.com/mysql To unsubscribe: http://lists.mysql.com/mysql
Mar 14
Baron Schwartz Re: Trying to update existing prices and sizes in products table
Mar 14, 2012; 08:44
Baron Schwartz
Re: Trying to update existing prices and sizes in products table
Mar 14
Claudio Nanni Re: Trying to update existing prices and sizes in products table
Mar 14, 2012; 14:34
Claudio Nanni
Re: Trying to update existing prices and sizes in products table
Search
Lasso Programming
This site manages and broadcasts several email lists pertaining to Lasso Programming and technologies related and used by Lasso developers. Sign up today!