SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

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

ramdas
Posting Yak Master

USA
181 Posts

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

USA
36895 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  
 New 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.06 seconds. Powered By: Snitz Forums 2000