all groups > sql server (alternate) > january 2004 >
You're in the

sql server (alternate)

group:

delete record


delete record bhetong22 NO[at]SPAM yahoo.com
1/27/2004 11:20:39 PM
sql server (alternate):
please help

i was trying to delete a specific record on a table but it still shows
Re: delete record sql NO[at]SPAM hayes.ch
1/28/2004 2:26:59 AM
[quoted text, click to view]

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 = ...

Re: delete record Chuck Conover
1/28/2004 6:53:26 AM
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


[quoted text, click to view]

Re: delete record Harold Helmich
1/28/2004 12:29:01 PM
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.

[quoted text, click to view]
AddThis Social Bookmark Button