From: Imre Ament on
Hi,

I have to repair overflowed column contents in a SQL Server 2005 database.
I would like to write a C++ program (with OLEDB) for fix the problem (on
future databases also).
I had found http://support.microsoft.com/kb/923247 but the solution does not
work on my environment.

There is a double precision floating point column ('float' in SQL Server),
The query (rewrited to new object names) what should show the damaged rows
does not work.

SELECT IDBilder, Im_IDMeasurement FROM Bilder
WHERE (Im_MicXPos <> 0.0) AND (Im_MicXPos < 2.23E-308 OR Im_MicXPos >
1.79E+308) AND (Im_MicXPos < -1.79E+308 OR Im_MicXPos > -2.23E-308);

Always return the known error message (I try it only in the 'Management
Studio)'
Msg 9100, Level 23, State 2, Line 2
Possible index corruption detected. Run DBCC CHECKDB.

If the (damaged) column arise in the 'WHERE' clause the query failed.
As I see there is no way to collect only the damaged rows in a rowset.
If someone know a solution, please say to me to I can avoid to investigate
all row in the table(s) :-)

Regards,
Imre
 | 
Pages: 1
Prev: SQL Help
Next: collect rows of damaged data