473,385 Members | 1,740 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,385 software developers and data experts.

Need Insight to Delete Query Method

Having searched the archives regarding a Delete Query, I found nothing
specific to my need, although there seems to be a plethora of ideas
and suggestions on queries in general. I have used Delete Queries
based on date selection parameters and those have performed fine, but
perhaps a parameter is not what I should use for the following.

Simply, I need to provide a method by which to query two fields and
delete all records associated with a specific Reference number and
date, i.e., RefID 545, delete all records with RefDate: 2/10/2004.
Well, more exactly, to provide a RefID, that will display all records
grouped by like date and from the selection to choose a group of
records by specific date to delete.

Any suggestions or ideas would be welcomed. Thanks, Dalan
Nov 12 '05 #1
2 1525
DELETE * FROM tblTable1 WHERE tblTable1.RefID=545 And
tblTable1.RefDate=#2/10/2004#;

This should delete all records that have the RefID 545 and the RefDate
2/10/2004. If the date isn't in US format, you may need to format it in US
format for the query to work properly.

--
Wayne Morgan
Microsoft Access MVP
"Dalan" <ot***@safe-mail.net> wrote in message
news:50**************************@posting.google.c om...
Having searched the archives regarding a Delete Query, I found nothing
specific to my need, although there seems to be a plethora of ideas
and suggestions on queries in general. I have used Delete Queries
based on date selection parameters and those have performed fine, but
perhaps a parameter is not what I should use for the following.

Simply, I need to provide a method by which to query two fields and
delete all records associated with a specific Reference number and
date, i.e., RefID 545, delete all records with RefDate: 2/10/2004.
Well, more exactly, to provide a RefID, that will display all records
grouped by like date and from the selection to choose a group of
records by specific date to delete.

Any suggestions or ideas would be welcomed. Thanks, Dalan

Nov 12 '05 #2
Thanks for the suggestion Wayne. I'll give it a go later today,
although I will probably have a couple of follow up questions since
this effort is in part related to a similar companion query. Dalan

"Wayne Morgan" <co***************************@hotmail.com> wrote in message news:<XB******************@newssvr31.news.prodigy. com>...
DELETE * FROM tblTable1 WHERE tblTable1.RefID=545 And
tblTable1.RefDate=#2/10/2004#;

This should delete all records that have the RefID 545 and the RefDate
2/10/2004. If the date isn't in US format, you may need to format it in US
format for the query to work properly.

--
Wayne Morgan
Microsoft Access MVP
"Dalan" <ot***@safe-mail.net> wrote in message
news:50**************************@posting.google.c om...
Having searched the archives regarding a Delete Query, I found nothing
specific to my need, although there seems to be a plethora of ideas
and suggestions on queries in general. I have used Delete Queries
based on date selection parameters and those have performed fine, but
perhaps a parameter is not what I should use for the following.

Simply, I need to provide a method by which to query two fields and
delete all records associated with a specific Reference number and
date, i.e., RefID 545, delete all records with RefDate: 2/10/2004.
Well, more exactly, to provide a RefID, that will display all records
grouped by like date and from the selection to choose a group of
records by specific date to delete.

Any suggestions or ideas would be welcomed. Thanks, Dalan

Nov 12 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: Raj | last post by:
Hi all, Can anyone help me with a script which would delete files or move them to a different folder at some scheduled time..! Please.....!!! Thanks in advance...
5
by: The Pig | last post by:
Got a table. Date Time Code 1/1/2003 1700 xbc 1/1/2003 1800 xbc 1/1/2003 1800 xbc 2/4/2004 1650 abc 2/4/2004 1700 abc The problem is I need a...
3
by: ssb | last post by:
Hello, This may be very elementary, but, need help because I am new to access programming. (1) Say, I have a column EMPLOYEE_NAME. How do I fetch (maybe, cursor ?) the values one by one and...
5
by: Neil | last post by:
I am getting time-out errors when I try to perform a simple delete on a linked server. The command is: Delete From MyTable Where PKID=12345 I have tried executing this command directly from...
17
by: mpar612 | last post by:
Hi everyone, I appreciate all of your help with me and the problems I have been having. I'm new to PHP and MySQL and I'm having some problems getting this script to work. I can't get this to...
3
by: tarscher | last post by:
Hi all, I have a grid that contains 7 columns from 3 tables (3 unique keys, 4 normal fields). I show this 7 columns on the gridview. I now want to add edit and delete functionality. This should...
5
by: rn5a | last post by:
The .NET 2.0 documentation states the following: When using a DataSet or DataTable in conjunction with a DataAdapter & a relational data source, use the Delete method of the DataRow to remove...
3
by: bluez | last post by:
I want to design a webpage where user can search the data from the database and list out the related records. Each of the record got a delete button which allow user to delete the record. ...
7
helpwithcode
by: helpwithcode | last post by:
Hi people, I am just learning java.I have been creating a project which involves JDBC Connectivity.I find that the statements, String string_dob=text_dob.getText(); //Converting string to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.