Hello,
I have 2 databases.
Each database contains a Table named MyTable with the following fields
ID (Numeric, unique values)
Comments (Text)
Img (Binary field)
In the first database (DBEven), there are only even IDs in MyTableEven
In the second database (DBOdd), there are only odd IDs in MyTableOdd
I cannot work with a unique database because the total size of the data exceed 2 GB.
I want to use a UNION QUERY to group these 2 tables in a unique recordset.
Since it is not possible to use UNION with binary fields, I have written the successive queries :
1. STEP : Attach MyTableEven in DBodd . It will be easier to continue ...
2. STEP : Creating the RecorsetUnion without the binary fields
RecordsetUnion = SELECT MyTableOdd.ID, MyTableOdd.Comments FROM MyTableOdd UNION SELECT MyTableEven.ID, MyTableEven.Comments FROM MyTableEven
3. STEP : Adding the OLE data from MyTableOdd
RecordsetUnion2 = SELECT RecordsetUnion.ID, RecordsetUnion.Comments, MyTableOdd.Img FROM RecordsetUnion LEFT JOIN MyTableOdd ON RecordsetUnion.ID=MyTableOdd.ID;
4. STEP : Adding the OLE data from MyTableEven
RecordsetUnion3 = SELECT RecordsetUnion2.*, MyTableEven.Img FROM RecordsetUnion2 LEFT JOIN MyTableEven ON RecordsetUnion2.ID=MyTableEven.ID;
Though it's a bit long ... it works BUT in RecordsetUnion3, the OLE data extracted from MyTable Even are NOT in the same field than the OLE data coming from MyTableOdd
How could I get all the OLE data in the same field ???
Thank you for your help,
Philippe