Delete Queries using Unmatched Query

Reading many helpful responses on this site, but unfortunately none of them 
seem to remedy my current issue.

Just learning Access, took a quick college prep course, got the basics.  Now 
I am expanding freelance.  SO the scenarios is my test idea that I have 
intent to apply on larger scale.  I have a database with 15 records... lets 
say reservations (tbl_reservations) for a hotel.  Used a maketable to copy 
that table because it gets updated often to cancelled or complete status.  So 
I filter out the 9 of those 15 reservations which are still in pending status 
and make the new table (tbl_pending_reservation) from those.  The next day I 
append 4 more pending reservations from the reservations table and add then 
to pending res table.  but now 4 of the original 9 reservations are 
cancelled.  I perform an unmatched query to find the 4 listed as pending in 
the pending reservation and listed as cancelled in the reservations table.

What is the best method of deleting the 4 records that are incorrect on the 
pending reservation table.  (keep in mind this is 4 records, but in the end 
it may be 1000's of records.)

I appreciate anyone taking the time to respond as this may be a wonderful 
example for others.
0
Utf
8/3/2007 6:42:02 PM
access.queries 6343 articles. 1 followers. Follow

1 Replies
1017 Views

Similar Articles

[PageSpeed] 55

I will take your suggestion and apply it in the manner you suggest, but in 
practice, is there a way that a match query or unmatch query can be used in a 
delete query?

"Dale Fye" wrote:

> Not sure why you need a "Pending Reservations" table; is this as opposed to 
> "Confirmed Reservations"?  It is not usually a good idea to store the same 
> information in multiple tables for just this reason.  When you update one, 
> you have to update the other.
> 
> I think I'd just have a Reservations table.  Any reservation that starts on 
> a future date, and does not have a confirmation number is a pending 
> reservation.  Then, when you cancel the reservation, you only have to do it 
> in one place.
> 
> If you are stuck with this structure, I would set it up so that as soon as a 
> reservation is cancelled, it is deleted from the Pending Reservations table.
> 
> HTH
> Dale
> -- 
> Email address is not valid.
> Please reply to newsgroup only.
> 
> 
> "cmiller" wrote:
> 
> > In additional to the given scenario, also please assist me with inverse of 
> > scenario.  Let us assume after appending the pending reservations table to 9 
> > entries, and the append query was run again.  For whatever reason, all 9 
> > entries have been added a second time.  Running a Find Duplicates Query 
> > reveals all 9 records twice each.
> > 
> > How would I delete from the pending reservations, 1 of each entry?
> > 
> > "cmiller" wrote:
> > 
> > > Reading many helpful responses on this site, but unfortunately none of them 
> > > seem to remedy my current issue.
> > > 
> > > Just learning Access, took a quick college prep course, got the basics.  Now 
> > > I am expanding freelance.  SO the scenarios is my test idea that I have 
> > > intent to apply on larger scale.  I have a database with 15 records... lets 
> > > say reservations (tbl_reservations) for a hotel.  Used a maketable to copy 
> > > that table because it gets updated often to cancelled or complete status.  So 
> > > I filter out the 9 of those 15 reservations which are still in pending status 
> > > and make the new table (tbl_pending_reservation) from those.  The next day I 
> > > append 4 more pending reservations from the reservations table and add then 
> > > to pending res table.  but now 4 of the original 9 reservations are 
> > > cancelled.  I perform an unmatched query to find the 4 listed as pending in 
> > > the pending reservation and listed as cancelled in the reservations table.
> > > 
> > > What is the best method of deleting the 4 records that are incorrect on the 
> > > pending reservation table.  (keep in mind this is 4 records, but in the end 
> > > it may be 1000's of records.)
> > > 
> > > I appreciate anyone taking the time to respond as this may be a wonderful 
> > > example for others.
0
Utf
8/3/2007 8:12:00 PM
Reply:

Similar Artilces:

How to Recover Deleted Sent Mail?
While trying to delete very old "Sent" mail I seem to have deleted all "Sent" mail. Is there a way of recovering this mail? Have you closed Outlook since deleting the old sent mail? http://www.howto-outlook.com/howto/restoredeleteditemsfromanoutlookpst.htm might help. Next time, archive the items you want removed from your active .pst file. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. All unsolicited mail sent to my personal account will be deleted without reading. After furious head scratching, Sidney Friedman as...

Using Popups to select a range of cells.
Hi All I have a small request for help with code. I need a macro to have popups request the first and last cells in a range , and then to select them. Can someone help? Sub test() Dim Rng As Range On Error Resume Next Set Rng = Application.InputBox("Select your range", _ "Mousework", Type:=8) On Error GoTo 0 If Rng Is Nothing Then Exit Sub MsgBox Rng.Address End Sub HTH. Best wishes Harald "Colin Hayes" <Colin@chayes.demon.co.uk> wrote in message news:8mYkILA1YlvLFw7Z@chayes.demon.co.uk... > > Hi All > >...

Cannot delete subreport
I am using Access 2003 and have a report I did a while back with a simple subreport. I want to remove the subreport but for the life of me can't figure out how to do it. Any help would be greatly appreciated. Thanks. Hi - When you say "remove the sub report", what do you mean? Do you want to delete the entire subreport control containing the subreport, or do you want to keep the control, but change the report contained in it? The first is easy - select the control by clicking once on it once, then press delete. For the second, click the control once, then set ...

Rule for Deleted Items
I am being told that there is a rule in place on my Exchange server that will not empty the deleted items folder every 30 days for certain users in my organization. I found a recipient policy in System Manager that says "Users Excluded from Mailbox Cleanup" but it only shows 2 users and not the 3 I was told about. But I have confirmed that the missing person has email in her deleted items folder going back to 2005 so it must be working. Is there any other location I should be looking? Also, we just had someone come in and migrate our Exchange environment from 2000 to a new...

cannot delete message from deleted items
I have a message in my deleted items folder that when choosing delete opens the McAfee box warning of potential virus and wants me to choose open or do not open, but will not delete. I have tried choosing another file and holding ctrl and choosing the file I want deleted and then choosing delete, I have tried moving it to the desktop but it will only copy there, I have tried every form of delete possible. I need help. Anyone know how? Outlook 2002. Can you empty the deleted items folder entirely? Or turn off the McAfee scanning temporarily to see if it makes a difference? Julie wr...

ODBC DSN query issue
I've researched this to death, and many sources point to the same answer, yet I keep getting the DSN prompt box when I try to run a query with the user ID & pw imbedded in the query. (I'm trying to get passed needing to manually enter a password when I run a Scheduled Task. - My system is set up that I do not have the option of saving a password.) This is what I have in the Source Connect Str ODBC;DSN=edwprdi0;UID=xxx;PWD=xxx; When I run as a pass-thru, I just get the prompt asking for a DSN SELECT ARMUV006.LEAD_CAR_INIT, ARMUV006.LEAD_CAR_NBR FROM ARMUV006 IN &...

I can not delete a duplicate personal folders list #2
Vall... amazing that there isn't an easy fix for this. The instructions provided simply don't work ( tools-email accounts-view change email accounts-deliver to new account-finish-close outlook and reopen ), and none of the other offered explanations have worked either. As this is such a common problem; why hasn't microsoft provided a very EASY fix? I am more confused ( and frightened ) and don't want to make the problem worse! Your profile is corrupt, probably based on an incorrect migration of your ..pst file. Create a new mail profile and configure it to use your exi...

INF for Ports class CDC USB device using usbser.sys fails DTM INFT
If a USB-to-serial CDC ACM specification device using usbser.sys is not classified as a modem, the New Hardware Wizard will not install the Virtual COM Port unless the INF file AddService directive Flags parameter has a value of 2 to set the SPSVCINST_ASSOCSERVICE bit. This causes both ChkInf and the DTM "INFTest for a single .INF" to fail with error "(E.22.1302) Filter drivers cannot be the controlling service (SPSVCINST_ASSOCSERVICE)." To certifiy the driver for a device that otherwise passes WINQUAL testing but is less complicated than a modem, is there any...

Using c# object in Excel VBA
Hi All I have writen an COM Object in C# to use it in Excel. This Object has a Function that delivers a List of Users from a Database. My problem is now that I get the List of Users but it is not posible to get one of the Properties of the User. But when I create a new Object with Set user = CreateObject("GuptaIntferface.UserVOCom") I can see all Properties of this object. My Question is now how can I tell VBA now that the objects in the List are the UserVOCOM Objects? thx for help Michael I'm kind of stabbing the dark on this one as I've never worked with a C...

Retrieval of Deleted Items After Being Deleted from the Deleted Items File
I deleted a number of important emails from the deleted items file in Outlook 2000. This may sound stupid, but I completely emptied the deleted items file instead of deleting them one by one. Pretty stupid, huh. Anyone. Can they be retrieved? Please help. Thanks. Sorry for sending this again but I seem to be computer illiterate and it has taken me some time to explain the whole situation. Thanks again. unless you use Exchange server with deleted retention enabled, you are most likely out of luck, but you can try something that might help.... http://www.outlook-tips.net/howto/r...

Delete macros
I am using Excel 2002. When I click on Tools->Macro->Macros... i see 2 macros. The problem I am having is that I can't delete these macros, the delete button to the right is grayed out. How can I delete these macros? Hi maybe the macros are protected. Try hitting ALT + F11 to open the VBA editor and try to delete the macros / modules there -- Regards Frank Kabel Frankfurt, Germany excel777 wrote: > I am using Excel 2002. When I click on Tools->Macro->Macros... i see > 2 macros. The problem I am having is that I can't delete these > macros, the delete button to ...

using data from one sheet to another
Hi I want to keep a running balance in a budget , month on month and I understand that its not best to use an accumalator. I was advised to have twelve separate tabs which is fine and I have copied the sheet to the next tab but I don't know how to link cells from one sheet to another. Can anyone help please, and yes I am an absolute beginner. Thanks -- Deb Assuming that by "a budget" you mean a checkbook type account where the present balance is continually calculated down the page then try something like: =LOOKUP(2,1/Sheet1!H1:H1000,Sheet1!H1:H1000) This will retur...

Report Query in RMS
Is there somewhere that I could get some information as to how the reports in RMS are composed. When you look at the various reports they all seem fairly simple in there basic structure. Are the any examples of how these reports are composed. The //--- Columns ---// iformation seems to be the same in most reports, same as the //--- Title Rows ---//. Setting up the flitters and the TablesQueried I need to understand. I have the schema for 1.2. How do I better understand the following or what do I need to learn. I wish I was in college again and had all the time in the world. //--- Repo...

Struggles with an update query ;(
Hi There, I would really appreciate some assistance, I am designing a database (low key) but I am trying to get my face known in an org (nothing to do with database thank goodness!) but I volunteered to do this database and have hit a major snag and I am not prepared to accept defeat. So this is my issue, if there is a lifesaver out help ! ;) So this is what I have at the moment. 1) A personal detail type records table 2)An evaluation form for projects attended. 3) What they would like is that when indivduals attend a project the project name is updated in the details form under "...

Go to the begining of the txt file after using getline()
Go to the begining of the txt file after using getline() I use fstream, open() and getline() to take a whole line from the text file. I would like to know how I can set the value of the file pointer to the beginning of the file without closing (with close() ) to start using getline() again. I need to do it many times and I think that making that without closing and reopening file thousands times will save much time. Could you advise me. Alur fseek(fileptr,0,SEEK_SET); AliR. "Alur" <Alur@discussions.microsoft.com> wrote in message news:CD7B7AFF-6057-4C37-955A-CADA73781B3...

deleting email in outlook, freezes before i can delete
i have a file with pics that symetec scanner says is to large. i can receieve email but cannot send any. it freezes before i can delete and says non responding. Hi All, I want to re-raise the old issue of Fax numbers showing up in the Outlook Address book when one is sending an email. I know that this can be stopped by prepending the Contact's fax number with a letter so that Outlook doesn't see it as a valid fax number and therefore doesn't list it. What's always puzzled me, however, is that this fix doesn't work if the fax numbers are changed using an export to CSV...

OK to delete Deleted Items folder?
I'm afraid I'll have to delete my Deleted Items folder in Outlook 2000. When I try to empty the folder I get a "The messaging interfce has returned an unknown error. If the problem persists Restart Outlook" message. Is it possible to delete the entire folder and replace it with an empty new one? Will it create any problems? TIA Henrik Not possible. Run scanpst.exe against your pst-file to scan it for errors first. -- Robert Sparnaaij [MVP-Outlook] www.howto-outlook.com Tips of the month: -What do the Outlook Icons Mean? -Create an Office 2003 CD slipstreamed with Se...

Re: Ranking my results in a query to get the TOP#10 percent
Hello, I have created several queries and now I would like to rank my result to only get the TOP 10 percent. Could you please assist me with an Access SQL statement that can accomplish this? Thanks, TL SELECT TOP 10 PERCENT * FROM somewhere ORDER BY someExpression It is not a 'rank' in itself, though, just a pick of the 'top most'. Light difference between the two expressions, but it probably does not matter... :-) Vanderghast, Access MVP "TL" <TL@discussions.microsoft.com> wrote in message news:E6549C8D-9FDC-4568-B73F-434BAF601BD7@mi...

use bahttext function in english language
please let me know how do i convert bahttext into english text You can't. See http://www.mvps.org/dmcritchie/excel/strings.htm#numberstowords In article <CEEFD6B0-15EE-429B-8F7D-11DDBD166F43@microsoft.com>, "rabih" <rabih@discussions.microsoft.com> wrote: > please let me know how do i convert bahttext into english text Hi http://www.j-walk.com/ss/excel/odd/odd20.htm :-)) Arvi Laanemets "rabih" <rabih@discussions.microsoft.com> wrote in message news:CEEFD6B0-15EE-429B-8F7D-11DDBD166F43@microsoft.com... > please let me know how do...

Very difficult query!
Hello All I have spent most of today on this and can't get it right: I hope someone out there can help! I need a query that will give a person's retirement date (RD), according to their date of birth (DOB). The trouble is that the age at which a person can retire is not constant, but is instead determined according to the following: for a DOB earlier than 6 April 1950, the RD is on their 60th birthday If DOB is 6 April 1950 to 5 May 1950, RD is 6 May 2010 If DOB is 6 May 1950 to 5 June1950, RD is 6 July 2010 If DOB is 6 June 1950 to 5 July 1950, RD is 6 Sep 2010 If DOB i...

How to delete chart
I created a histogram and want to delete it. I select it and the faint double border apperars. There are no square handles like in 2003. Then I press the Delete key. The faint double border goes away replaced by a single thin black border. The chart is still there and is not able to be selected at all. I entered "delete chart" in the Excel Help window, and there was nothing at all on deleting a chart. Ditto for "remove chart." I got no help searching on the internet either. I have Excel 2007 and Windows XP Professional When the border changes, can you press Delete a...

Delete blank Last page
In a word document where the last page is blank due to editing or whatnot, how do you get rid of the frigg' thing. This is a Visio newsgroup - your question was about Word. However, I have had this problem as you have. Narrowing the margins and line spacing on the page previous to the last may get rid of this annoying "blank" page for you. - Jeff Chapman "silkies" <silkies@discussions.microsoft.com> wrote in message news:BDCC1FF1-50D0-42CE-BA84-868CB26A43AC@microsoft.com... > In a word document where the last page is blank due to editing or > whatnot...

can't save files in subfolders using Word #2
I'm running Word on a Mac running OS X. When I go to save a file in Word, it only gives me the option to save in the root files like "Documents" or "Applications." How do I save the file into a subfolder? On a PC, I would double click to open the folders until I got to the folder I needed. That doesn't work here. Can someone help? I'm sure this is something obvious I'm missing. Thanks - Taylor In article <1163740041.258317.226140@b28g2000cwb.googlegroups.com>, taylorgriffin@gmail.com wrote: > I'm sure this is something obvious I'...

How do I make a timeline using Microsoft Publisher?
I am helping my 9 year old make a timeline on banner paper for a book he read. What specifically do you want help with? -- JoAnn Paules MVP Microsoft [Publisher] "frazzled lady" <frazzled lady@discussions.microsoft.com> wrote in message news:BCA48394-758F-4017-AA8F-CB1EA37266B8@microsoft.com... >I am helping my 9 year old make a timeline on banner paper for a book he >read. http://office.microsoft.com/en-us/results.aspx?Scope=TC&Query=timeline -- Mary Sauer MSFT MVP http://office.microsoft.com/ http://msauer.mvps.org/ news://msnews.microsoft.com "...

Deleting an email
I have an email (with a file attached) that is "hung up" in my outbox of Microsoft Outlook. Now I can't send or receive emails in Outlook. How can I delete the email that is "hung up"? Define hung up. Is it trying to send it? If so, disconnect your connection while it's trying to send and wait. It will time out after a bit and you should be able to delete it. Reconnect. "Aaron Hurliman" <AaronLHurliman@aol.com> wrote in message news:03b001c34f39$0fb61ff0$a301280a@phx.gbl... > I have an email (with a file attached) that is "hung up&q...