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 |
rajdaksha
Aged Yak Warrior
595 Posts |
Posted - 2009-06-30 : 06:36:36
|
hiI have table data like this 1.14011E-050.0019564450.0019627410.0022099710.0024366730.0026769510.0071416640.0106395130.0123261240.0123396080.0134944150.015439458But i want to convert the data like this0%0%0%0%0%0%1%1%1%1%1%2%please help on thisbyraj...:) |
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2009-06-30 : 06:41:18
|
multiply by 100 and convert to integer ?convert(int, col * 100) KH[spoiler]Time is always against us[/spoiler] |
|
|
rajdaksha
Aged Yak Warrior
595 Posts |
Posted - 2009-06-30 : 06:46:56
|
Thanks |
|
|
rajdaksha
Aged Yak Warrior
595 Posts |
Posted - 2009-06-30 : 06:51:59
|
Hi I did the same operation in excel. but i got differen record set from excel and sql server which u have mention Convert( int, col *100) |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2009-06-30 : 06:57:35
|
if you are performing the formatting in excel you should leave the value as it is and don't convert it, but format as PERCENTAGE in excel. KH[spoiler]Time is always against us[/spoiler] |
|
|
rajdaksha
Aged Yak Warrior
595 Posts |
Posted - 2009-06-30 : 07:10:02
|
hi If i show the values from SQL SERVER the client will ask the format whatever in excel show's i hope you know very well about the client thoughts. |
|
|
rajdaksha
Aged Yak Warrior
595 Posts |
Posted - 2009-06-30 : 07:11:08
|
I perofrming in sql server only what i did is convert the process excel to SQL SERVER |
|
|
Jeff Moden
Aged Yak Warrior
652 Posts |
Posted - 2009-07-19 : 20:59:50
|
SELECT STR(0.007141664*100,3,0)+'%'--Jeff Moden "Your lack of planning DOES constitute an emergency on my part... SO PLAN BETTER! ""RBAR is pronounced "ree-bar" and is a "Modenism" for "Row-By-Agonizing-Row" |
|
|
|
|
|