Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Why Union Query without sorting?

817008Nov 20 2010 — edited Nov 20 2010
select * from v$version;

BANNER
----------------------------------------------------------------
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - Prod
PL/SQL Release 10.2.0.4.0 - Production
CORE    10.2.0.4.0      Production
TNS for 32-bit Windows: Version 10.2.0.4.0 - Production
NLSRTL Version 10.2.0.4.0 - Production

SELECT 'M'||ITEM NO
  FROM BSBAST01
 WHERE SYSTP='EM' AND SPTP='STAT' AND ID='MEDTP'
UNION
SELECT SUBSTR(SPTP,5)||ID NO
  FROM BSBAST00
 WHERE SYSTP='ES' AND (  (SPTP='ID_SC' AND PID='-' AND V3='P') OR (SPTP='ID_SD' AND PID='-')  )
/

NO
--------------
M51L
M53
M93
MT51L
MT53
MT92
MT9B
DR1
MT93
MT9A
M91
M9B
MT51
MT91
CP0
M51
M92
M9A
MT50
It's bug?
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Dec 18 2010
Added on Nov 20 2010
1 comment
127 views