I have VB 6.0 application which accepts two database tables and compares the data in those tables.(Compares col. by Col.). Then it emphasises the changes with different colors i.e Modification - Yellow ,Addition - Red ,- Deletion Blue etc.
I have given one option to export the data to MS - Excel. The out put required to the Excel File is One record from Source table and Second one from Destination file / table (So that it would be easy to understand the comparison between two records).I have one column common to both the tables.Using this column i compare the records and emboss with color codes.
But when i export to Excel i select first ID (which is common)
export the record from source file then get record with the same id from desitination file and export that to the next line. But for say, 10000 records it takes a lot of time.
Do anyone have the solution?
What you really want is a FULL OUTER JOIN. Let the VB app handle creating the spreadsheet from the result set (making two rows in the app's output from one row of the query's output) and let the SQL Server do the "heavy lifting" of the data for you.
There is a disconnect between your query and your desired output, but the client side code in the VB app can handle that disconnect nicely!