Please start any new threads on our new site at We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
Save Password
Forgot your Password?

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Converting From Float to int
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Posting Yak Master

181 Posts

Posted - 01/06/2003 :  15:36:27  Show Profile  Reply with Quote
Hi Folks,
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.

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

Ramdas Narayanan
SQL Server DBA

Almighty SQL Goddess

38200 Posts

Posted - 01/06/2003 :  15:45:12  Show Profile  Visit tkizer's Homepage  Reply with Quote
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
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.02 seconds. Powered By: Snitz Forums 2000