Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

–1.#QNAN

Status
Not open for further replies.

Saama5

Programmer
Jan 6, 2002
52
US
Thru my program it is storing –1.#QNAN in float data type field. I want to restrict Sql Server to store this value and if program is giving this as input then it store 0 in place of it. Is there any way to give formula or trigger something to check it?
 
I think you need to provide more info,

I have no idea what you want

Transcend
 
if you are inserting the data through a stored proc and you are passing "–1.#QNAN" parameter as a varchar type, then you can check it out using: if isnumeric(@paramname) ...

if you are inserting it directly from a client program, then you should do the validation there before even sending it to sql server.

alfredp77
 
Thanks alfredp77.
I am not passing -1.#QNAN intentionally. It might be like ado when reading empty field from float data type or we loose network it is storing -1.#QNAN. We have done lot of checks on client program. Now I have given 0 as default value when we insert empty record. If any other clue please let me know. If we are passing 0 everytime then still it happens, I did not get it how it happens.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top