I don't think "order by" is allowed in a view.
You will have to use an index or a MQT.
You can also create a web page with a table and insert it into a speadsheet. (if the web page does not replace the spreadsheet)

Vernon Hamberg wrote:

Are you telling CA to use this exact statement? Or just something like select * from view? I would expect the ORDER BY in the view to be honored, as I think you do, too, but not sure.

On 4/5/2013 12:02 AM, w 4038 wrote:

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 thread ...

Follow-Ups:
Replies:

Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

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.