|
All,
I have two tables with the same data layout. TableA is inventory from last month. TableB is the current inventory.
The goal is to put both tables side by side in a spreadsheet to compare last month to the current month.
Most of the rows are duplicates and exist in both tables. Some rows are new items in the current month. Some rows existed last month but no longer exist in the current month.
The following SQL statement creates a view and the side by side comparison is perfect. (Thanks to B Hauser for the coalesce suggestion)
create view qgpl/viewAB as
Select * from
(select * from qgpl/tableA
full outer join qgpl/tableB
on f1file = f2file
order by coalesce(f1lib,f2lib),
coalesce(f1file,f2file), coalesce(f1mbrname, f2mbrname) ) as t
But when I download the view using Client Access, the order is not maintained. Does anyone know why?
Thank you
As an Amazon Associate we earn from qualifying purchases.
This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].
Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.