× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



Rick,

If I try
create index osp_a on mikee/osp (oheda8)

I get
OSP in MIKEE not a table.

I'm doing this because one of our RPG programmers wants to join two files
(header and detail) and do the primary sort on a field in the detail file
and the secondary sort on a field in the header file.  She says she can't
do this in DDS.

I thought I could possibly create such a logical with SQL, so she could use
RLA against it in her RPG program.  She's not against using embedded SQL in
her program, but she doesn't know how and I thought this might be easier.

Thanks,
Mike E.




                                                                                
                                      
                    "Richard B Baird"                                           
                                      
                    <rbaird@xxxxxxxxxxxxx       To:     Midrange Systems 
Technical Discussion                         
                    ting.com>                    <midrange-l@xxxxxxxxxxxx>      
                                      
                    Sent by:                    cc:                             
                                      
                    midrange-l-bounces@xx       Subject:     Re: sql - create 
view and order by                       
                    drange.com                                                  
                                      
                                                                                
                                      
                                                                                
                                      
                    03/28/2003 08:13 AM                                         
                                      
                    Please respond to                                           
                                      
                    Midrange Systems                                            
                                      
                    Technical Discussion                                        
                                      
                                                                                
                                      
                                                                                
                                      





Mike,

I believe you are correct. views don't allow the order by clause.

Can you create an index over the view?  are you going to use this
view/index exclusively with sql?

if so, you can do your 'order by's when you use the view.  if not, why not
just create a joined logical? (two birds, one stone)

Rick

----original message------
<snip>
It looks like there's no way to put an ORDER BY clause in a CREATE VIEW
statement.  I'm trying
<snip>

_______________________________________________
This is the Midrange Systems Technical Discussion (MIDRANGE-L) mailing list
To post a message email: MIDRANGE-L@xxxxxxxxxxxx
To subscribe, unsubscribe, or change list options,
visit: http://lists.midrange.com/mailman/listinfo/midrange-l
or email: MIDRANGE-L-request@xxxxxxxxxxxx
Before posting, please take a moment to review the archives
at http://archive.midrange.com/midrange-l.






As an Amazon Associate we earn from qualifying purchases.

This thread ...


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.