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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Corrupt Table

Status
Not open for further replies.

swemho

MIS
Jun 13, 2001
12
0
0
SE
I've had some real difficulties with our customer database.

But by putting the database in Emergency mode I can access most of the data.
I have 2 tables from which I can't fetch the data, the bad thins is they are the most important tables.

If I do a select * from RESERVATION I get bad chain linkage, connection broken.

But if I do a select count(*) from RESERVATION I get 10 000 rows without errors. And if I run:

select RESE_RESERVATIONID from RESERVATION I get 13 000 rows. so I have figured out that the error is in one or more columns, which themselves are not so important.
Can I somehow extract all data, but leave out those columns ?
 
Select col1, col2
into TAble2
from table1

This will create a second table with the columns you specified.
 
hi

do you have the name of the columm header?

Are u susing SQL server?

if so just create a new view and import these 2 table and just select each field name to be displayed and you will see on what field you will get an error

hope this helps

pgtek
 
The reason why I suggested the select into vice creating a view is that you want to copy the the clean data to another table so that you can eventually drop the old data table and rename the new one with the name of the old one. Don;t forget to script the old table first, so you can easily recreate any indexes, triggers, constraints,etc.

However, if you have a backup, the best procedure might be to restore the backup. If you don't have a backup, you need to set this up as soon as you get the data you want out of the table.
 
Hi
to SQLSister
Hi this is fine col1, col2
but that does not give him the name of the field columm?

but if he has SQL he can insert these table in a view there he will se the columm name used for theses table
If does not have permission to create view most all company have a development database server he can work on

cheers

pgtek
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top