Click to See Complete Forum and Search --> : corrupted table


thechasboi
10-14-2006, 05:26 PM
I have this application which some how inserted the incorrect data into the wrong column. The comumn in question is int and the data is text well needless to say things are getting strange with the table. I tried unsuccessfully to restore from backup I am probably doind something wrong or missing something. I have tried unsuccessfully to find the row in question and delelte it or at least change the data. I would appreciate and suggestions.

Thanks in advance

chazzy
10-14-2006, 06:33 PM
what dbms?

thechasboi
10-14-2006, 09:53 PM
chazzy

Server 2005 ent.

russell
10-14-2006, 10:19 PM
not possible to insert text into int column. check the table definition again. also, tell us what collation setting on the server.

can try to clean it by

-- Delete FROM
SELECT *
FROM yourTable
WHERE isNumeric(someColumn) = 0

where someColumn is the one u think is int but has text data in it.

russell
10-14-2006, 10:23 PM
also, is your application showing u bad data, or are u seeing this in Management Studio? If it's your app, then I'd suspect the app. if it is mngmt studio then the query above will point out the bad data, which you can then fix, or delete