var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Query Select Like and replace/update
Good afternoon everyone.
I am trying to come up with a script that will do a select using a LIKE statment and then updating each found record with the same string minute "THE"
For example I have several thousand records that need to be update that start like "The Locusts" or the a.k.a.s. What I need to do is replace "The Locusts" with "Locusts".
So far I know I need to do:
Select * FROM table where item like "The%'
Anyone have any experience doing this and want to help out?
o I should also add the query I am trying to write too.
This is what I have so far, yet it dosen't seem to work:
set artist = replace(artist, 'the', '')
where id = 21989
Found it. I made a temp db from a copy of my live and was able to find what worked.
set artist = (replace(`artist`, 'The ', ''))
worked just fine, though it was case sensitive which was also causing problems.
Hopefully you don't have any music by The The.