ibmi-brunch-learn

Announcement

Collapse
No announcement yet.

records fetched in alphabatical order

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • records fetched in alphabatical order

    Hi,

    I have a PF
    DDS
    Code:
                                                UNIQUE
                    R RCOUNTRY                        
                      CNTRYNAME     20                
                    K CNTRYNAME
    inserted records in some random order, but while retrieving records in program they are coming in alphabetical order.

    anyone know the reason??

    Thanks

  • #2
    Re: records fetched in alphabatical order

    Since there is a key defined on CTRYNAME within the DDS description.
    ... And I assume you used keyed Access in your program (Check for K in your F-Specs).

    Birgitta

    Comment


    • #3
      Re: records fetched in alphabatical order

      Hi Kishor:

      If you are using SQL you need an ORDER BY statement.
      Even though the file is keyed SQL will pick the best access path.

      Best of Luck
      GLS
      The problem with quotes on the internet is that it is hard to verify their authenticity.....Abraham Lincoln

      Comment

      Working...
      X