Re: compare 2 recordsets
- From: "Bob Barrows [MVP]" <reb01501@xxxxxxxxxxxxxxx>
- Date: Fri, 28 Sep 2007 20:59:02 -0400
RB Smissaert wrote:
What would be the best (fastest) way to do this:Why are you using recordsets for this? Are the recordsets from different
I have 2 ADO recordsets say A and B.
They both have a common field, say ID
Now I need to delete all the records in recordset A where
the value in the field ID is not found in the field in recordset B.
These are values of the datatype Long.
The ID field will be sorted ascending in both recordsets.
Now, I could do this with a double loop, but that could be a bit slow
and I wonder if this could be done better with a filter or find.
databases?
If not, this is a job for SQL.
If so, there's no alternative to looping through one of them, but you can
use Filter to get the corresponding records in the other recordset.
--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
.
- Follow-Ups:
- Re: compare 2 recordsets
- From: RB Smissaert
- Re: compare 2 recordsets
- From: RB Smissaert
- Re: compare 2 recordsets
- From: RB Smissaert
- Re: compare 2 recordsets
- References:
- compare 2 recordsets
- From: RB Smissaert
- compare 2 recordsets
- Prev by Date: compare 2 recordsets
- Next by Date: Re: compare 2 recordsets
- Previous by thread: compare 2 recordsets
- Next by thread: Re: compare 2 recordsets
- Index(es):
Relevant Pages
|
|