Reputation: 1
I'm trying to add a text string to certain columns. This is a query I've tried, it failed miserably though, but it explains what I want to do.
SET @NAME = (Select name from item_template where itemset = 801);
SET @NEWNAME = ('|cFFFF0000'+@NAME);
Update item_template set name = @NEWNAME where itemset = 801;
Thanks in advance! :)
Upvotes: 0
Views: 87
Reputation: 3759
SET @NEWNAME = ('|cFFFF0000'+@NAME);
use concat
SET @NEWNAME := CONCAT('|cFFFF0000',@NAME);
Upvotes: 0
Reputation: 204746
try
Update item_template
set name = (select * from (select concat('|cFFFF0000', name)
from item_template
where itemset = 801) x
)
where itemset = 801;
or even shorter
Update item_template
set name = concat('|cFFFF0000', name)
where itemset = 801;
Upvotes: 0
Reputation: 3245
Why not just
update item_template set name = concat('|cFFFF0000',name) where itemset = 801;
Upvotes: 1