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 |
|
maraghy
Starting Member
1 Post |
Posted - 2008-02-03 : 12:07:00
|
| Hi,Can any one help me in that case?I have 2 colomns one have the month (1,2,3,4,....,12) and the other have the years (2007,2008,....)I want to merge both in one date field MM/DD/YYYY and the day will always be '01'Thank youM.Maraghy |
|
|
subrata4allfriends
Starting Member
24 Posts |
Posted - 2008-02-03 : 12:43:23
|
| Please go through the following sample............SELECT CAST('01-'+COL1+'-'+COL2 AS DATETIME) FROM TABLE1replace col1/ col2/ table1 as ur table and column name............hope it will help uThanks & Regards,4allfriends."Life is not a bed of roses." |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
|
|
|
|
|