jgoodman00
Programmer
- Jan 23, 2001
- 1,510
I tried the following SQL to see if I could convert some data into REAL datatype on the fly (I eventually want to convert it permanently).
SELECT CAST(Distance AS REAL)
FROM ADOPT
ORDER BY Distance
However, when I try this I get an error (I am running this throught eh SQL Query Analyzer) Server: Msg 8114, Level 16, State 5, Line 1
Error converting data type nvarchar to real.
So, I ran:
SELECT DISTINCT Distance
FROM ADOPT
ORDER BY Distance
This produced 690 results. The first is NULL. The second is 0, followed by several values such as 004 etc. The last value is 99
Are any of these values specified illegal for the REAL datatype? If not, what is the best way of tracing which value(s) are the illegal ones?
James Goodman
SELECT CAST(Distance AS REAL)
FROM ADOPT
ORDER BY Distance
However, when I try this I get an error (I am running this throught eh SQL Query Analyzer) Server: Msg 8114, Level 16, State 5, Line 1
Error converting data type nvarchar to real.
So, I ran:
SELECT DISTINCT Distance
FROM ADOPT
ORDER BY Distance
This produced 690 results. The first is NULL. The second is 0, followed by several values such as 004 etc. The last value is 99
Are any of these values specified illegal for the REAL datatype? If not, what is the best way of tracing which value(s) are the illegal ones?
James Goodman