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-30 : 12:05:00
|
Hi, I just converted a column data type from float to char..I am getting e values in hte column for example...1500007135 is represented as 1.50001e+009 How can i fix this.Regards,SushantDBAWest Indies |
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2011-06-30 : 12:13:40
|
convert it to an int first, and then char.JimEveryday I learn something that somebody else already knew |
 |
|
skybvi
Posting Yak Master
193 Posts |
Posted - 2011-06-30 : 12:43:30
|
when i try to convert it to int , error comes ---'PLU1' table- Unable to modify table. Arithmetic overflow error for type int, value = 2150000036.000000.The statement has been terminated.Regards,SushantDBAWest Indies |
 |
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2011-06-30 : 12:51:43
|
Then convert it to a bigint instead.JimEveryday I learn something that somebody else already knew |
 |
|
skybvi
Posting Yak Master
193 Posts |
Posted - 2011-06-30 : 13:02:19
|
I converted to bigint, but when i try to convert bigint to charerror says :---'PLU1' table- Unable to modify table. Arithmetic overflow error converting expression to data type varchar.The statement has been terminated.Regards,SushantDBAWest Indies |
 |
|
jimf
Master Smack Fu Yak Hacker
2875 Posts |
Posted - 2011-06-30 : 13:23:31
|
What exact data type type are you trying to convert to and can you provide some sample data that you are trying to convert?JimEveryday I learn something that somebody else already knew |
 |
|
skybvi
Posting Yak Master
193 Posts |
Posted - 2011-06-30 : 13:26:59
|
i want to convert float to charI converted float to bigint successfully.I have a query wich compares columns from 2 tables both(columns) are numbers...but one datatype is char and other bigint(just now converted)So wen i run that query column1=column2it says :---Msg 8114, Level 16, State 5, Line 1Error converting data type varchar to bigint.Regards,SushantDBAWest Indies |
 |
|
|
|
|
|
|