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 |
vipinjha123
Starting Member
45 Posts |
Posted - 2012-06-13 : 01:30:47
|
Dear All,i have dateofjoining columni need to convert dateofjoining month-year format to use as a parameterand it should come in ascending order regards,Vipin jha |
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2012-06-13 : 04:10:53
|
select dte = convert(varchar(6),dateofjoining,112), dteparm = right(convert(varchar(10),dateofjoining,105),5)from tblorder by dteor maybe you meanselect *from tblwhere datediff(mm,dateofjoining,convert(datetime,'01-'+@mmm,105) =0order by dateofjoining==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
|
|