Originally Posted by
pa_sjo
UPDATE Users SET Name = 'Cunt' WHERE Name = 'Chip'
.. slightly more orthadox?

No, because that will change the data in the table, I dont want to touch the actual data, I just want to manipulate a copy of it.
What im actually doing is crossreferencing from one table to another, and the data in the first table can be tagged with thing like <asset>some-item-name</asset> to say that when rendering a page from that table you need to go and insert an asset with that item name, and some software im writing needs to do a similar thing, but I cant just do where "this = that" I have to do where "this = replace(replace(that,'<asset>',''),'<asset>','')
So that: <asset>some-item-name</asset>
becomes: some-item-name
during the query, but the underlying data isnt altered.
So my actual query ended up like this:
select bv_editorial.author, main_graphic, ad_abstract, location from bv_editorial, bv_advertisement, tgb_assets where tgb_assets.name = replace(replace(ad_abstract,'</asset>',''),'<asset>','') and ad_name=main_graphic and bv_editorial.store_id = 101 and bv_editorial.status =1 and bv_editorial.deleted=0 and main_graphic is not null and ad_abstract like '<asset>%'