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 2000 Forums
 SQL Server Development (2000)
 Converting From Float to int

Author  Topic 

ramdas
Posting Yak Master

181 Posts

Posted - 2003-01-06 : 15:36:27
Hi Folks,
Scenario:
I am retrieving a column called forecast from table A. The datatype of forecast is float. This retrieved column is to inserted into a column of data type int. I use a CAST function to convert to int. In case the value is NULL i replace it with 0. When I run the query I get an the following error:

[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]ConnectionCheckForData (CheckforData()).
Server: Msg 11, Level 16, State 1, Line 0
General network error. Check your network documentation.

Statement:
CAST(ISNULL(TableA.[Forecast],0) AS int)

Ramdas Narayanan
SQL Server DBA

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2003-01-06 : 15:45:12
I don't think that the error is caused by the CAST command. Are you running this over a linked server? Do you always get this error when you run it?

I ask these questions because this is a problem that is associated with not being able to connect to the SQL Server over TCP/IP.

Go to Top of Page
   

- Advertisement -