Hi, I'm new to SQL...have you ever had this problem before?
Goal: remove "and it's code is (different numbers)" in column prod_description
Table Product
prod_id | prod_description
001 | Hi, this is your box and it's code is 123 Mike
002 | Hi, this is your box and it's code is 456 Mike
003 | Hi, this is your box and it's code is 789 Mike
I want the result to look like this
prod_id | prod_description
001 | Hi, this is your box Mike
002 | Hi, this is your box Mike
003 | Hi, this is your box Mike
Is there an SQL command I could use to achieve this?
I tried using replace and it will not accept the wildcard symbol '%' between words as a parameter inut within replace()
This does not work
select product
set prod_description = replace(prod_description,'Hi, this is your box%Mike','')
where prod_description like '%Hi this is your box%Mike%'
Is it only a single word you want to keep at the end? If so, a simple(ish) series of reverse / substring (or left) / reverse might do the job