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 |
|
ComputerMike
Starting Member
18 Posts |
Posted - 2009-06-19 : 15:57:27
|
| I have a number that represents a month and a number that represents a day. I need to return these formatted and part of a string.Exampledeclare @Day intdeclare @Month intset @Day = 5set @Month = 2select 'Check ' + ????? + ' every year'result should be....."Check 02/05 every year"Should be simle but haveing really hard time...Thanks,Mike |
|
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2009-06-19 : 17:49:52
|
| You need to convert the ints to stringsselect 'Check ' + right('0' + convert(varchar(2),@month),2)+'/' + right('0' + convert(varchar(2),@day),2) + ' every year'Jim |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-06-20 : 02:06:07
|
| shouldn't this be done in your presentation layer? can i ask need of building this string from sql itself? whats your front end app? |
 |
|
|
|
|
|