why is order by silly in pl/sql?

From: Chris Eastwood <c.eastwood_at_gu.edu.au>
Date: Wed, 06 May 1998 06:52:16 GMT
Message-ID: <6ip0ve$1sb$1_at_nkraken.itc.gu.edu.au>



HiYa

[Quoted] [Quoted] I am wanting to do a cursor that has a union of two selects:

    select cl.ORDER_CREATED_BY who,
           cl.COMMIT_AMOUNT amt,
           cl.COMMITMENT_DESCRIPTION descr,
           cl.MERCHANT_NAME shop,
           pu.EMAIL_ADDRESS email,
           'COMMITMENT' type

[blurg]

UNION
    select ca.USER_NAME who,
           sd.AMOUNT amt,
           sd.TRANSACTION_DESCRIPTION descr,
           sd.MERCHANT_NAME shop,
           pu.EMAIL_ADDRESS email,
           'STATEMENT' type

[blah]

    order by who,type;

but it seems that I have to to

    order by 1, 6;

HUH?? is there a reason for this? I would be interested to know this

See Ya
(when bandwidth gets better ;-)

Chris Eastwood

Photographer, Programmer               email    ua.ude.ug.cti_at_doowtsae.c
Motorcyclist and dingbat               WWW   http://chrise.itc.gu.edu.au

************************************************************************
Ohhh ... you work all day, slave over a hot stove all night  yet you *still* have time for sadomasochism ... how do you do it?

A little man hurts me.

<ding>

    Oh Mister Mean ... Oh Mister Mean
    15 Minutes with him and you'll be blue and green     Studded belts and leather whips
    Bondage trousers on his hips
    Wack and punish as you dust with Mister Mean   Ohhhh he whips me around the house in minutes ... lets get cracking ... Received on Wed May 06 1998 - 08:52:16 CEST

Original text of this message