var sidebar_align = 'right';
var content_container_margin = parseInt('290px');
var sidebar_width = parseInt('270px');
Unanswered: Concatenate fields
I have a destination table with a Dest_Name field (like 'Los Angeles') and a Dest_State field (like 'CA'). I would like to update Dest_Name so that it would read
'- CA - Los Angeles'
How do I update / concatenate fields while also including hyphens?
Many thanks for saving me more hours of stumbling
Best from Belgium
This should do what you want :
update destination set Dest_Name = CONCAT('- ', Dest_State,' - ',Dest_Name);
So it did ! Thank you very much. I don't find any reference to this 'concat' command in Sams' "Teach yourself sql in 10 minutes" which I thought was the unchallenged reference ...
Originally Posted by RBARAER
Are there any other mystical commands like this one? Any idea where I could find a tutorial?
Many thanks again & have a splendid day!
Glad it helped you !
There is nothing "mystical" here though, all commands such as this one are in the MySQL manual (and are mostly MySQL-specific, not standard SQL) :
Have a pleasant read !