DBAsupport.com Forums - Powered by vBulletin
Page 2 of 2 FirstFirst 12
Results 11 to 17 of 17

Thread: amazing problem

  1. #11
    Join Date
    May 2000
    Location
    ATLANTA, GA, USA
    Posts
    3,135
    Can you post the table creation statement and rows insert ?
    That may help to understand the problem.

    Tamil

  2. #12
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    Quote Originally Posted by LKBrwn_DBA
    PS: Union all will make no difference unless routes are duplicate.
    ... other than eliminating an unneccessary sort of the data set, which I'd regard as being pretty important. UNION ALL ought to be the first recourse, and UNION should only be used where there is a specific requirement to make the result set distinct.

    Do you roll your eyes at colleagues in meetings? Nice touch.
    David Aldridge,
    "The Oracle Sponge"

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

    Oracle ACE

  3. #13
    Join Date
    Sep 2006
    Posts
    7
    thanks...
    but the order of the mon objects was changed -

    e.g.
    original:
    mon1 mon2
    mon2 mon3
    mon3 mon5
    mon5 mon2
    mon2 mon1

    --> after the union command:
    mon1 mon2
    mon2 mon1
    mon2 mon3
    mon3 mon5
    mon5 mon2

    --> but it's very important that the order is the same as the original, because afterwards some other activities are done.

  4. #14
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    Quote Originally Posted by petzi74
    thanks...
    but the order of the mon objects was changed -

    e.g.
    original:
    mon1 mon2
    mon2 mon3
    mon3 mon5
    mon5 mon2
    mon2 mon1

    --> after the union command:
    mon1 mon2
    mon2 mon1
    mon2 mon3
    mon3 mon5
    mon5 mon2

    --> but it's very important that the order is the same as the original, because afterwards some other activities are done.
    If you want order then mark each set of the result with a flag to indicate which column pair it came from -- ordering the result set by pair number would then be possible. Don't rely on the set being ordered without applying an ORDER BY.
    David Aldridge,
    "The Oracle Sponge"

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

    Oracle ACE

  5. #15
    Join Date
    Sep 2006
    Posts
    7
    How can I set a flag...

    ..sorry for that question...

  6. #16
    Join Date
    Aug 2002
    Location
    Colorado Springs
    Posts
    5,253
    Add a new column to each result set, with each one having a value like "Pair 1", "Pair 2", or just numerics of 1, 2, 3 etc
    David Aldridge,
    "The Oracle Sponge"

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

    Oracle ACE

  7. #17
    Join Date
    Sep 2006
    Posts
    7
    Thanks a lot for your help...

    as usual...


    Petra.

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