MySQL Forums
Forum List  »  Full-Text Search

replace 1,2,3,4 by field
Posted by: Paul Polin
Date: June 22, 2012 05:48AM

I am having a table with

id ---- ids
18 ---- 15,17,123,45

how can I replace ids by names from another table ?

UPDATE tb1 SET ids = REPLACE(ids, %id_from_tb2%, name_fromtb2);

to get

18 --- Paul,John,Pierre,Roger

thank you

Options: ReplyQuote


Subject
Views
Written By
Posted
replace 1,2,3,4 by field
3380
June 22, 2012 05:48AM
2035
June 29, 2012 06:15PM
2058
June 30, 2012 02:01AM
2071
July 01, 2012 12:21PM
2101
July 02, 2012 12:40AM


Sorry, you can't reply to this topic. It has been closed.

Content reproduced on this site is the property of the respective copyright holders. It is not reviewed in advance by Oracle and does not necessarily represent the opinion of Oracle or any other party.