Delete query Help

  • Thread starter Thread starter Bill Davis
  • Start date Start date
B

Bill Davis

I have run a duplicate query to find the duplicate for
the [invID]. I have another column that has and F and C
indicator I want to delete only the [invID] with the
indicator of C can someone please help me with this
task..
Thank you in advance
Bill
 
Hi Bill,

Here's an example of modifying the Query created by the Duplicate Query
Wizard

DELETE OrdersTest.CustomerID, OrdersTest.CustomerID
FROM OrdersTest
WHERE (((OrdersTest.CustomerID) In (SELECT [customerID] FROM [OrdersTest]
As Tmp GROUP BY [customerID] HAVING Count(*)>1 )) AND
((OrdersTest.CustomerID)="alfki"));


What I did is use the duplicate Query wizard. Open the query in design
view and added the column [customerID] for criteria (as in your case would
be [invID]) and then changed the SELECT query to a DELETE query.

I hope this helps! If you have additional questions on this topic, please
respond back to this posting.


Regards,

Eric Butts
Microsoft Access Support

"Microsoft Security Announcement: Have you installed the patch for
Microsoft Security Bulletin MS03-026? If not Microsoft strongly advises
you to review the information at the following link regarding Microsoft
Security Bulletin MS03-026
<http://www.microsoft.com/security/security_bulletins/ms03-026.asp> and/or
to visit Windows Update at <http://windowsupdate.microsoft.com/> to install
the patch. Running the SCAN program from the Windows Update site will help
to insure you are current with all security patches, not just MS03-026."


--------------------
| Content-Class: urn:content-classes:message
| From: "Bill Davis" <[email protected]>
| Sender: "Bill Davis" <[email protected]>
| Subject: Delete query Help
| Date: Wed, 21 Jan 2004 12:30:32 -0800
| Lines: 8
| Message-ID: <[email protected]>
| MIME-Version: 1.0
| Content-Type: text/plain;
| charset="iso-8859-1"
| Content-Transfer-Encoding: 7bit
| X-Newsreader: Microsoft CDO for Windows 2000
| Thread-Index: AcPgXWrrE2ygryF2QHyEgg3dw5f8+A==
| X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4910.0300
| Newsgroups: microsoft.public.access.queries
| Path: cpmsftngxa07.phx.gbl
| Xref: cpmsftngxa07.phx.gbl microsoft.public.access.queries:187093
| NNTP-Posting-Host: tk2msftngxa08.phx.gbl 10.40.1.160
| X-Tomcat-NG: microsoft.public.access.queries
|
| I have run a duplicate query to find the duplicate for
| the [invID]. I have another column that has and F and C
| indicator I want to delete only the [invID] with the
| indicator of C can someone please help me with this
| task..
| Thank you in advance
| Bill
|
|
 
Back
Top