0

Lock issue occurred when i tried to update a Column of a table with concatenate the same column value with some characters.

UPDATE Templates 
   SET TemplateName = CONCAT("'", (SELECT TemplateName 
                                           FROM Templates 
                                          WHERE LogID = 2), '_Validated',"'")
 WHERE LogID = 2; 

Is there any possible ways to achieve this?

Juan Mellado
  • 14,973
  • 5
  • 47
  • 54
Tanya
  • 1,571
  • 5
  • 22
  • 33

1 Answers1

4

Use:

UPDATE TEMPLATES
   SET TemplateName = CONCAT("'", templatename, '_Validated')
 WHERE LogID = 2
OMG Ponies
  • 325,700
  • 82
  • 523
  • 502
  • Thanks for your immediate reply..Sorry i have mistaken the code.. both are the same tables.. kindly saw the updated code :) – Tanya Oct 22 '11 at 06:11