need to delete record having two different fields with same value

L

L. T. Portella

need to delete record having two different fields with same identical value

daily I am given a table (access 2000) where a record may have the same
identical value in two of its fields. I have to delete such a record. Can
anyone help me with this
 
B

Brendan Reynolds

Unless I'm missing something, it would seem to be a simple delete query ...

DELETE * FROM YourTable WHERE FirstField = SecondField

Am I missing something?

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 
L

L. T. Portella

Brendan
No I am sure you are not missing anything except that I just dont know how
to do it. Could you walk me through step by step. I know how to set a query
but when you say "delete * from your table where firstfield = secondfield" I
would not know where to start. Thank you for your time
 
B

Brendan Reynolds

Start by creating an ordinary select query, and specify the criteria, e.g.
in the criteria row of your "firstfield" column the expression would look
like =[secondfield]. Switch to datasheet view to make sure that it displays
only the records you want to delete. Then go back into design view and
choose Delete Query from the Query menu.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top