Results 1 to 6 of 6
  1. #1
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713

    Unanswered: How To:Purge orphans across databases

    This is a way to find unmatched records and purge them across 2 databases ...

    DELETE * From HISRPM WHERE (HISRPM.ReportNumber IN
    (SELECT HISRPM.ReportNumber
    FROM HISRPM LEFT JOIN [C:\WhateverFolder\WhatEver.mdb].Data ON
    HISRPM.ReportNumber = Data.ReportNumber
    WHERE (((Data.ReportNumber) Is Null))));
    Back to Access ... ADO is not the way to go for speed ...

  2. #2
    Join Date
    Jul 2003
    Location
    Michigan
    Posts
    1,941
    Leave it to Mike to want to purge orphans
    Inspiration Through Fermentation

  3. #3
    Join Date
    Jun 2005
    Location
    Richmond, Virginia USA
    Posts
    2,763
    Provided Answers: 19
    Must be from a "red" state!
    Hope this helps!

    The problem with making anything foolproof...is that fools are so darn ingenious!

    All posts/responses based on Access 2003/2007

  4. #4
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Mike - are you posting this as an FAQ\ code bank item?
    If FAQ - Teddy - are you happy with junior Modulators such as Yours Truly posting links in the FAQ or do you want to retain supervisory control of the resource?
    Testimonial:
    pootle flump
    ur codings are working excelent.

  5. #5
    Join Date
    Sep 2003
    Location
    MI
    Posts
    3,713
    Quote Originally Posted by pootle flump
    Mike - are you posting this as an FAQ\ code bank item?
    If FAQ - Teddy - are you happy with junior Modulators such as Yours Truly posting links in the FAQ or do you want to retain supervisory control of the resource?
    I'm posting this cause I've seen some similar questions on this in the past (and I JUST found this query I wrote after searching for it on and off for weeks). Now, as to whether this meets the threshold for being a code bank candidate, I don't know ... That I'll leave to others.
    Back to Access ... ADO is not the way to go for speed ...

  6. #6
    Join Date
    Feb 2004
    Location
    One Flump in One Place
    Posts
    14,912
    Quote Originally Posted by M Owen
    Now, as to whether this meets the threshold for being a code bank candidate, I don't know ... That I'll leave to others.
    I reckon so. The code bank was initially intended for snippets - it was only me getting over excited that makes it look like more substantial stuff should be in there. I reckon heterogenous queries more than fulfill the requirement. Gerrit on

    *Besides, it will only get lost over time if not in a sticky....
    Testimonial:
    pootle flump
    ur codings are working excelent.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •