October 4, 2006 at 4:41 am
I have problem with convertion of Varchar data to Real , the below query works fine in one server and another server throws the error 'Error converting data type varchar to real'
Query : SELECT CONVERT(real,'689.99')
Please help.. Thanks
October 4, 2006 at 6:43 am
Try using FLOAT
SELECT CONVERT(FLOAT,'689.99')
October 4, 2006 at 6:46 am
float gives the same error..
October 4, 2006 at 6:11 pm
I did not get any error see below: check if you installed fresh sql server service pack
SELECT CONVERT(real,'689.99')
---result---------------------
689.98999
(1 row(s) affected)
---
October 5, 2006 at 6:35 am
try SELECT CONVERT(real,'689,99')
and see if that works.
October 5, 2006 at 6:49 am
Check for differences between the server settings inc. @@MAX_PRECISION and service pack level.
Also any patches which may have been applied to SQL Server.
October 5, 2006 at 7:00 am
Nothing of the above worked , but weekly reboot of server this morning cured the issue... Puzzling!
October 5, 2006 at 8:59 am
That would imply a server setting or session setting was changed.
This was then reset to default on reboot.
Not sure what it might be though.
October 5, 2006 at 9:48 am
I think you are right, we got lot of guys playing with servers here...
Viewing 9 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply