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 |
skybvi
Posting Yak Master
193 Posts |
Posted - 2011-06-27 : 16:22:47
|
Hi, I am changing the datatype from plu_num(float) to char (13) of a column of a table, when i successfully do it..The values un that column change like from original 4400002280 to 4.4e+009 How can i remove the e values...i want to get full value..Regards,SushantDBAWest Indies |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2011-06-27 : 16:44:36
|
Why? Why would you want to change a float to a char datatype?A common rule when designing a database application is to use proper datatype. N 56°04'39.26"E 12°55'05.63" |
 |
|
skybvi
Posting Yak Master
193 Posts |
Posted - 2011-06-27 : 16:49:45
|
actually both columns (in diff table) have same type of data for example523458659 (just numbers) I want to write a query which selects data with conditioncolumn1=column2 ....But now, its not matching as e comes ....I dunno, y they created float at first place or char for those data...Regards,SushantDBAWest Indies |
 |
|
Michael Valentine Jones
Yak DBA Kernel (pronounced Colonel)
7020 Posts |
Posted - 2011-06-27 : 17:18:01
|
[code]select New_plu_num = convert(char(13),convert(bigint,plu_num)), a.*from ( --Test Data select plu_num = convert(float,4400002280) ) a[/code]Results:[code]New_plu_num plu_num ------------- ----------------------------------------------------- 4400002280 4400002280.0 [/code]CODO ERGO SUM |
 |
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2011-06-27 : 17:32:30
|
If you already have changed the datatype of column, there is NO way to convert it back and revert the loss of precision. N 56°04'39.26"E 12°55'05.63" |
 |
|
|
|
|