vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| |||
| bhetong22@yahoo.com (bher2) wrote in message news:<f34a4b26.0401272320.6f8cd318@posting.google. com>... > please help > > i was trying to delete a specific record on a table but it still shows > the same record that should be deleted. i dont know how. How are you deleting it? How are you seeing it? Try something like this from Query Analyzer: delete from dbo.MyTable where MyPrimaryKeyColumn = ... select * from dbo.MyTable where MyPrimaryKeyColumn = ... Simon |
| |||
| bher2, There may be several reasons for this. Here are some ideas: - Do a select before you do the delete. See if that brings up the records you think it will bring up. - Try the select, then the delete in SQL Query analyzer. If you are doing this in an application, you might not be seeing any errors that come up, like foreign key errors. - Try grabbing the PK first for the record(s) you want to delete, if there is one and then delete by PK. - Try updating the statistics on the table. If they are "broken", your db might not be finding the record(s) you expect, if any. Hope that helps, Best regards, Chuck Conover www.TechnicalVideos.net "bher2" <bhetong22@yahoo.com> wrote in message news:f34a4b26.0401272320.6f8cd318@posting.google.c om... > please help > > i was trying to delete a specific record on a table but it still shows > the same record that should be deleted. i dont know how. |
| ||||
| Also, take a look at triggers on the table. There may be a trigger defined as "instead of delete", which could prevent actual deletion of the record and just mark it as deleted. Chuck Conover wrote: > bher2, > There may be several reasons for this. Here are some ideas: > - Do a select before you do the delete. See if that brings up the records > you think it will bring up. > - Try the select, then the delete in SQL Query analyzer. If you are doing > this in an application, you might not be seeing any errors that come up, > like foreign key errors. > - Try grabbing the PK first for the record(s) you want to delete, if there > is one and then delete by PK. > - Try updating the statistics on the table. If they are "broken", your db > might not be finding the record(s) you expect, if any. > > Hope that helps, > Best regards, > Chuck Conover > www.TechnicalVideos.net > > > "bher2" <bhetong22@yahoo.com> wrote in message > news:f34a4b26.0401272320.6f8cd318@posting.google.c om... > >>please help >> >>i was trying to delete a specific record on a table but it still shows >>the same record that should be deleted. i dont know how. > > > |
| Thread Tools | |
| Display Modes | |
|
|