UPDATE update
SET Artist = REPLACE(Artist,' (','-')
WHERE (Artist LIKE '%([0-9][0-9][0-9][0-9])%')
Which works, but some times there's multiple things with parentheses. So how can I get it to update anything with parentheses and a year (Artist LIKE '%([0-9][0-9][0-9][0-9])%'), but leave anything else with a parentheses alone. So if the artist field looks like this:
SQL Server does not have support for regex except through CLR functions. So this is somewhat convoluted, but give it a shot. I am showing with a single variable, you can easily adapt it to data in a table by replacing the variable with the column name.
Yep, issues is that was just one case. I would need it to look for anything with a parentheses and year and replace the beginning ' (' with '-' and remove the ending ')'. So it would look for '%([0-9][0-9][0-9][0-9])%' and update it to '-1997' or whatever it is.. It doesn't have to use replace, if there's a better way to do that I would be up for that.
Might be an Import process? This sort of data un-mangling is normal for us when we get data from Clients' other "so called normalized databases" ... I don't suppose our database structure is perfect, but it amazes me what we are presented with from other vendor solutions - even Big Name Brand applications and their databases.
I could tell them a thing or two, I can tell you ...