Nested SQL

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



I am trying to do something that I believe requires nested SQL. I am having
a devil of a time with understanding how nesting works!!

Here is what I am trying to do:

Query has 1 table as input. The table has a multifield key.
Table is called Invoice
Structure of the table is:

TelephoneNumber, InvoiceDate, RecurringCharge, MinUsed
3342227777,08/01/2006,100.00,25
3342227777,09/01/2006,111.00,26
3342227777,10/01/2006,80.00,15
3342227777,11/01/2006,135.00,40
8342229999,08/01/2006,100.00,25
8342229999,09/01/2006,111.00,26
7342228888,08/01/2006,100.00,25
7342228888,09/01/2006,111.00,26
7342228888,10/01/2006,80.00,15
7342228888,11/01/2006,135.00,40
3342220000,10/01/2006,88.00,15
3342220000,11/01/2006,134.00,40

The key fields are TelephoneNumber and InvoiceDate.

I would like to ba able to have 2 Queries:
The first Query would Identify all Telephone numbers deleted between
09/01/2006 and 10/01/2006. I know number 834222999 is deleted because the
last month is 09/01/2006 and there is no month 10 record. The output from
the query would be all fields for 8342229999.

The second query would identify all telephone numbers added between
09/01/2006 and 10/01/2006. I know number 3342220000 is added because the
first month is 10/01/2006 and there is no month 9 record. The output from
this query would be all fields for 3342220000.

Is this doable? I am far from an expert at SQL or VBA. Does anyone have any
suggestions on how to do this??

Thank You,
Greg


.



Relevant Pages

  • Re: Query for change in Responsibility
    ... help I am struggling with the nested SQL stuff. ... Tips for Access users - http://allenbrowne.com/tips.html ... I am trying to do a select query on one table using access 2000. ...
    (microsoft.public.access.queries)
  • Re: Run-time error Method Open of Object _Recordset failed
    ... bobm wrote: ... If I remove the nested sql it runs ok. ... Have you tested it as a query in Access? ...
    (microsoft.public.access.modulesdaovba)
  • RE: Query stopped working after entry 615 in table
    ... Macro Name: Find Jenish Invoice ... Table Name: Previous Invoices For Tracking ... How many records does Jenish Invoice Query pull? ...
    (microsoft.public.access.queries)
  • RE: Saving Form
    ... If it is a query, ... You HAVE the computer record of the invoice that you want. ... > everything we need to know about our inventory ex. ... >> would execute a report for the current record. ...
    (microsoft.public.access.forms)
  • RE: Saving Form
    ... ok well the form is bound to a query where the only thing in it is the "in ... You HAVE the computer record of the invoice that you want. ... >> everything we need to know about our inventory ex. ... >>> would execute a report for the current record. ...
    (microsoft.public.access.forms)