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.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Problem with Excel Data

Author  Topic 

CSK
Constraint Violating Yak Guru

489 Posts

Posted - 2008-11-14 : 13:27:10
Hello friends,

Whenever I import the records from Excel, the customer no column is chnging into diffrent format in SQL 2005.

Eg: Excel Data

32400469500000000
32400469600000000
32400469700000000
32500434300000000
32500434400000000
32500434600000000
32600355500000000
32600355600000000
32600355700000000
32600355800000000
32600355900000000
32600356000000000
32600356100000000


Eg: What i got in SQL Server 2005(Column datatype is Nvarchar(25))

3.24004695E+16
3.24004696E+16
3.24004697E+16
3.25004343E+16
3.25004344E+16
3.25004346E+16
3.26003555E+16
3.26003556E+16
3.26003557E+16
3.26003558E+16
3.26003559E+16
3.2600356E+16
3.26003561E+16
3.26003562E+16


Please help me to solve this problem

Thanks
Krishna

CSK
Constraint Violating Yak Guru

489 Posts

Posted - 2008-11-14 : 14:02:44
SELECT CAST(3.24004695E+16 AS NUMERIC(20,2)) IS WORKING FOR ME. THANKS
Go to Top of Page
   

- Advertisement -