Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
aniko
Starting Member
25 Posts |
Posted - 2012-01-17 : 00:58:17
|
| Hi team,I have birth_day, birth_month, birth_yearI also have an empty column named birth_date in the same table.How do I concatenate the birth date data into the birth_date field?cheers,aniko |
|
|
jackv
Master Smack Fu Yak Hacker
2179 Posts |
Posted - 2012-01-17 : 01:38:59
|
| If you mean string concatenation then something like :SELECT 'birth_day' + 'birth_month' + 'birth_year' as birth_date .....If you mean UPDATE the "birth_date" something like:UPDATE myTable SETbirth_date = birth_day + birth_month+birth_yearDepending on the data type you'll need to CAST to relevant data typeJack Vamvas--------------------http://www.sqlserver-dba.com |
 |
|
|
aniko
Starting Member
25 Posts |
Posted - 2012-01-17 : 16:48:22
|
| Thank you! Works great. |
 |
|
|
jackv
Master Smack Fu Yak Hacker
2179 Posts |
Posted - 2012-01-18 : 10:24:30
|
| Your welcomeJack Vamvas--------------------http://www.sqlserver-dba.com |
 |
|
|
|
|
|