Wrox Programmer Forums
Access Discussion of Microsoft Access database design and programming. See also the forums for Access ASP and Access VBA.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Access section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old February 8th, 2006, 05:18 PM
Friend of Wrox
Join Date: Sep 2005
Posts: 106
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via Yahoo to Corey
Default Delete Query


I’m trying to set up a delete query.

I currently have a table with 3 columns:

CustNb OrdrNb 1stElecPurch

The CustNb houses the customer number “May be a repeated number” depending on if the customer has more then one order.

The OrdrNb column houses the Order Number. The Order Number is a unique value.

The 1stElecPurch column houses blanks and “X”’s

What I would like to be able to do is:
Find the X and delete every including the row with the X and above until the it reaches the next CustNb

Any help with this would be great and very much appreciated

Thank you


Old February 10th, 2006, 08:24 AM
Friend of Wrox
Join Date: Mar 2004
Posts: 3,069
Thanks: 0
Thanked 10 Times in 10 Posts

Can you provide sample data as it would appear before the query was run, and then what it should look like after?

Also, why "X" and not Yes/No?

Old February 12th, 2006, 07:36 PM
Registered User
Join Date: Feb 2006
Posts: 3
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Cybersurfer

DELETE [table.*]
FROM table
WHERE criteria

The DELETE statement has these parts:

Part Description
table The optional name of the table from which records are deleted.
table The name of the table from which records are deleted.
criteria An expression that determines which records to delete.

DELETE is especially useful when you want to delete many records.



Similar Threads
Thread Thread Starter Forum Replies Last Post
php/mysql delete button and delete query dungey PHP Databases 17 April 11th, 2009 12:24 PM
delete query using trigger prashant_telkar SQL Language 1 June 19th, 2007 10:39 AM
Delete query problem aneesh_sunu@yahoo.co.in PHP How-To 2 December 18th, 2006 09:24 AM
Delete Query IanC2005 SQL Language 3 March 5th, 2006 09:56 PM
Delete Query not working kbonney98 Access 1 April 14th, 2005 06:29 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.