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 |
|
inbs
Aged Yak Warrior
860 Posts |
Posted - 2010-04-06 : 04:56:53
|
| how i convert to varchar?i have this number: 123.44i want 123 (in varchar) |
|
|
vaibhavktiwari83
Aged Yak Warrior
843 Posts |
Posted - 2010-04-06 : 04:59:13
|
| CONVERT(VARCHAR, FLOOR(123.44))Vaibhav T |
 |
|
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2010-04-06 : 04:59:54
|
Tryconvert(varchar(10),convert(int,your_col)) No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
senthil_nagore
Master Smack Fu Yak Hacker
1007 Posts |
Posted - 2010-04-06 : 05:00:37
|
| Select cast ( cast(123.44 as int) as varchar(5))Senthil.C------------------------------------------------------[Microsoft][ODBC SQL Server Driver]Operation canceledhttp://senthilnagore.blogspot.com/ |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2010-04-06 : 05:13:05
|
quote: Originally posted by inbs how i convert to varchar?i have this number: 123.44i want 123 (in varchar)
Why do you want it as varchar?MadhivananFailing to plan is Planning to fail |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|
|