Unix Technical Forum

NaN and SQL 2000

This is a discussion on NaN and SQL 2000 within the MS SQL ODBC forums, part of the Microsoft SQL Server category; --> Hi, I'm tried to insert a double.NaN (C#) into a float column in SQL 2000 (8.0). When I check ...


Go Back   Unix Technical Forum > Database Server Software > Microsoft SQL Server > MS SQL ODBC

Register FAQ Members List Calendar Search Today's Posts Mark Forums Read
  #1 (permalink)  
Old 02-27-2008, 09:11 PM
David
 
Posts: n/a
Default NaN and SQL 2000

Hi,

I'm tried to insert a double.NaN (C#) into a float column in SQL 2000 (8.0).

When I check the " select count(*) ", it retuns the count of all the records
i've tried to insert into the table until now. Right...

But, when i try to " select * ", it returns all records, less that one i had
inserted with double.NaN, and I get the "[Microsoft][ODBC SQL Server
Driver]Numeric value out of range"

What should I do? Is it a bug? Or I can't use NaN with SQL Server?!

Thanks,

David


Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
  #2 (permalink)  
Old 02-27-2008, 09:13 PM
Mike C#
 
Posts: n/a
Default Re: NaN and SQL 2000

I see nobody has supplied an answer yet. SQL Server doesn't recognize NaN.
You can use SQL's NULL to indicate a missing numeric value.

"David" <dalssoft at gmail com> wrote in message
news:OH4wUvCeGHA.4900@TK2MSFTNGP02.phx.gbl...
> Hi,
>
> I'm tried to insert a double.NaN (C#) into a float column in SQL 2000
> (8.0).
>
> When I check the " select count(*) ", it retuns the count of all the
> records i've tried to insert into the table until now. Right...
>
> But, when i try to " select * ", it returns all records, less that one i
> had inserted with double.NaN, and I get the "[Microsoft][ODBC SQL Server
> Driver]Numeric value out of range"
>
> What should I do? Is it a bug? Or I can't use NaN with SQL Server?!
>
> Thanks,
>
> David
>



Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiFurl this Post!
Reply With Quote
Reply


Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On
Forum Jump


All times are GMT. The time now is 12:21 AM.


Powered by vBulletin® Version 3.6.5
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
SEO by vBSEO 3.2.0
www.UnixAdminTalk.com