+ Reply to Thread
Results 1 to 4 of 4

Thread: Order by clause when Creating views...

  1. #1

    Default Order by clause when Creating views...

    The SQL standard does not allow the order by clause when creating tables or views. You use the order by when selecting data from the table or view. The system looks at the existing access paths & figures out the best way to get the data. There is also a create index command you can use to create other access paths.

  2. #2
    Guest.Visitor Guest

    Default Order by clause when Creating views...

    This is true and you really do not want that option. You can select info from your (non order by) view and order in your select. i.e. Select * From Myview Order By NewKey Cheers!

  3. #3
    Guest.Visitor Guest

    Default Order by clause when Creating views...

    Is this not allowed? Create View MyView as Select * From MyTable Order By NewKey Why not? Also why does query/400 read a logical file by RRN instead of by the key defined in the logical? I just learned about this the other day. What's the deal?

  4. #4
    Guest.Visitor Guest

    Default Order by clause when Creating views...

    I'm taking your word for it since I did see a complex eplination of this in my ANSI SQL manual. It kinda caught me by suprise b/c I was always under the assumption that running a LF thru query/400 would retain the LFs key sequencing. I guess I'll just try to keep this in mind for the future.

+ Reply to Thread

Similar Threads

  1. Date comparison in where clause
    By Guest.Visitor in forum SQL
    Replies: 6
    Last Post: 11-17-2004, 11:08 AM
  2. SQL Views
    By Guest.Visitor in forum Application Software
    Replies: 1
    Last Post: 11-02-2000, 10:47 AM
  3. Redefine clause in COBOL
    By Guest.Visitor in forum Programming
    Replies: 4
    Last Post: 11-12-1999, 04:35 AM
  4. SELECT CLAUSE
    By Guest.Visitor in forum Programming
    Replies: 3
    Last Post: 11-23-1998, 12:18 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts