DBAsupport.com Forums - Powered by vBulletin
Page 1 of 2 12 LastLast
Results 1 to 10 of 11

Thread: Default sorting

  1. #1
    Join Date
    Jun 2000
    Location
    chennai,tamil nadu,india
    Posts
    159

    Default sorting

    Hi,
    Is there any way i can change the default sorting method (Ascending or Descending) for a database.

  2. #2
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    http://download-west.oracle.com/docs...24.htm#1020138 to change linguistic sort, but there's no way to change default to "descending" that I'm aware of.
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

  3. #3
    Join Date
    Jun 2000
    Location
    chennai,tamil nadu,india
    Posts
    159
    The problem here is

    i have 2 databases and when i issue a statement like

    SQL> select * from com_groupby; from DB1

    GROUPBY_NAME
    --------------------
    Brand
    Manufacturer
    Sub Segment
    Super Segment

    SQL> select * from com_groupby; from DB2

    GROUPBY_NAME
    --------------------
    Super Segment
    Sub Segment
    Manufacturer
    Brand


    The order seems to be different.I am not using any sort here.What could be the reason???.Is the way the data was stored or anything else???.

    Pls. let me know.

  4. #4
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    Without an ORDER BY, the sorting order is irrelevent.
    Jeff Hunter

  5. #5
    Join Date
    Jun 2000
    Location
    chennai,tamil nadu,india
    Posts
    159
    Yes its amazing.I tried to insert a new record in that table and when i queried the table still it sorts.Let me know if anybody have any idea???.

  6. #6
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    Originally posted by marist89
    Without an ORDER BY, the sorting order is irrelevent.
    Jeff Hunter

  7. #7
    Join Date
    Jun 2000
    Location
    chennai,tamil nadu,india
    Posts
    159
    select * from lpeduc.com_groupby;
    GROUPBY_NAME
    --------------------
    Brand
    Manufacturer
    Sub Segment
    Super Segment

    insert into lpeduc.com_groupby values('Detroit');
    1 row created.

    SQL> select * from lpeduc.com_groupby;

    GROUPBY_NAME
    --------------------
    Brand
    Detroit
    Manufacturer
    Sub Segment
    Super Segment

    SQL> desc lpeduc.com_groupby
    Name Null? Type
    ----------------------------------------- -------- ----------------------------
    GROUPBY_NAME NOT NULL VARCHAR2(20)

    This has a primary key index on GROUPBY_NAME.

    Let me know if someone find something???.

  8. #8
    Join Date
    Nov 2002
    Location
    Geneva Switzerland
    Posts
    3,142
    Listen to what Jeff said ! ! ! !

    Without an order by clause, the order of returned rows will be:
    IRREPRODUCIBLE,
    DIFFERENT TODAY AND TOMORROW,
    RANDOM,
    UNDEFINED,
    MYSTERIOUS,
    MAGIC

    and a complete waste of time trying to investigate or predict.

  9. #9
    Join Date
    Nov 2000
    Location
    greenwich.ct.us
    Posts
    9,092
    maybe you should find out about the init.ora parameter:
    _sorting_order=-1
    Jeff Hunter

  10. #10
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    Originally posted by marist89
    maybe you should find out about the init.ora parameter:
    _sorting_order=-1
    Or ...

    _group_by_equals_sort=true
    David Aldridge,
    "The Oracle Sponge"

    Senior Manager, Business Intelligence Development
    XM Satellite Radio
    Washington, DC

    Oracle ACE

Posting Permissions

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


Click Here to Expand Forum to Full Width