|
-
Oct 6th, 2002, 05:22 AM
#1
Thread Starter
Addicted Member
How to compare 2 recordsets???
Hi guys
Well I have done the following:
Set db=dbEngine.OpenDatabase(database)
Set rs1 = db.OpenRecordset( SQLquery1,dbopendynaset)
Set rs2 = db.OpenRecordset( SQLquery2,dbopendynaset)
Now I have 2 recordsets with the same fields now I want to have rs3 as following
Rs3= select rs1.Field1,rs1.Field2 from rs1,rs2 where rs1.Field1<> rs1.Field2
The main idea of this query is to obtain records in rs1 which does not exist in rs2. now my problem is that I don’t know how to use a SQL query for 2 different recordsets that I have created while runtime can anybody help?
Thank u
-
Oct 6th, 2002, 05:26 AM
#2
Thread Starter
Addicted Member
Re: How to compare 2 recordsets???
sorry guys i meant:
Rs3= select rs1.Field1,rs1.Field2 from rs1,rs2 where rs1.Field1<> rs2.Field1
-
Oct 6th, 2002, 06:08 AM
#3
Lively Member
What scenario U R talking about why do u need Two recordsets for one table.....
why dont u use where condition in first record set and after adding those records in the grid then close the recordset and open again record set with different condition then their will be no need to open two recordsets....
for instance if u compare rs1.fields1 <> rs2.fields1 then there will be, in one case duplication of records at selection or no records selected....
if this is not the problem u r facing then please explain clearly
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|