Hitachi Vantara Pentaho Community Forums
Results 1 to 3 of 3

Thread: why the data are automatically sorted

  1. #1
    Join Date
    Sep 2007
    Posts
    19

    Default why the data are automatically sorted

    Hi,

    When I move data from Access to Postgres,
    the data in Postgres are automatically sorted according to the value of the first column.

    Is there any way that I could keep its initial order in Access data file?

    Thanks.

    Hannah

  2. #2
    Join Date
    May 2006
    Posts
    4,882

    Default

    lol ... depends what does the sorting... as first step replace the output by a text output step and check whether it's sorted when you run it. If it's sorted it means that access is sorting. If the text output file is not sorted, Postgres sorts.

    Do you have primary keys on access, postgres. It could be e.g. that access uses a primary by default to return your data. Maybe it's the select query you run on postgres that returns the data in a sorted way, ...

    And in general SQL uses set theory... there is no "official" order

    Regards,
    Sven

  3. #3
    Join Date
    Sep 2007
    Posts
    19

    Default

    Thanks, Sven.
    Yes. The text output is sorted.
    But when I run "select * from tb;" under Access, the output is not sorted.

    It's a little bit strange.
    I would check the Access setting.

    Thanks a lot for your prompt reply.

    Hannah

    Quote Originally Posted by sboden View Post
    lol ... depends what does the sorting... as first step replace the output by a text output step and check whether it's sorted when you run it. If it's sorted it means that access is sorting. If the text output file is not sorted, Postgres sorts.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.