SQL command to remove hypens from data value A commerce site that I am working on has products titles and skus in the format of DS-PC-CDJ2000.

The client wants the each hyphen removing and replacing with a space; DS PC CDJ2000

There are hundreds of products so I want to do this in the database if possible. What would be a suitable command to run on the relevant database tables?
To ensure caches are invalidated properly, and contrib modules get the chance to act on data changes, you should always make this kind of global change with the API.

If you've checked, and you're sure you won't suffer any ill-effects by not using the API, then:

UPDATE commerce_product SET sku = REPLACE('-', ' ', sku)
UPDATE commerce_product SET title = REPLACE('-', ' ', title)


And the same for the commerce_product_revision table. You may also need to run something like

UPDATE node SET title = REPLACE('-', ' ', title) WHERE type = 'product_display_type'


And the same for node_revision depending on how you have node revisions and product displays set up.

But direct DB access is not the recommended way to perform a task like this. Take a backup before trying anything just in case