Hi - I have 2 disconnected recordsets both with same number of fields with same field names and I just want to combine/merge them. What's the best way to do this? BTW there will not be duplications as the key value is unique across both. Thanks
the way i'd do it is just get 1 recordset with all of the fields in it. You can do this by usin a UNION sql statement when you retrieve the records
for example
SELECT field1, Field2, Field3 FROM TABLE A
UNION ALL
SELECT field1, Field2, Field3 FROM TABLE B
The ALL makes it include duplicates so if you're sure there can be no duplicates the ALL is not needed.
For this to work the fields have to be the same data types and in the same order.
the way i'd do it is just get 1 recordset with all of the fields in it. You can do this by usin a UNION sql statement when you retrieve the records
for example
SELECT field1, Field2, Field3 FROM TABLEA
UNION ALL
SELECT field1, Field2, Field3 FROM TABLEB
The ALL makes it include duplicates so if you're sure there can be no duplicates the ALL is not needed.
For this to work the fields have to be the same data types and in the same order.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.