question

harry.dba avatar image
harry.dba asked

0 and -O values while converting from sql 2000 to sql 2008

We recently upgraded on of our applications to sql 2008 from 2000 while trying to insert from a query it's inserting -0 instead of zero.It's converting from float to varchar....Did any body have the similar issue thanks in advance...
sql-server-2008sql-server-2000upgrade
2 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ThomasRushton avatar image ThomasRushton ♦♦ commented ·
So your float is a small negative number (eg -0.00000001), and that's being converted to a varchar '-0'? How is the conversion happening?
0 Likes 0 ·
Grant Fritchey avatar image Grant Fritchey ♦♦ commented ·
I've never seen anything like this on any of the upgrades I've done. I haven't heard about it from any other sources either. It's got to be something in the code that 2000 was somehow more forgiving on.
0 Likes 0 ·

1 Answer

·
Grant Fritchey avatar image
Grant Fritchey answered
That is not one I've run into or seen. It sounds like either the code, the query, or the stored procedure is using the wrong data type. From that you're getting an implicit conversion. It is possible that the changes in ADO connectivity between 2000 and 2008 could be leading to the cause. We had issues with code that was querying data types from the table prior to generating inserts that came down to a change in how ADO handled that. You may also look there.
1 comment
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

harry.dba avatar image harry.dba commented ·
thanks grant but i cannot find any solution yet
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.