Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

ORDER BY in UNION doesn't allow col name?

6 posts in General Discussion Last posting was on 2005-03-13 01:19:20.0Z
AA Posted on 2004-09-16 15:44:08.0Z
Sender: 28c3.412ac4a3.1804289383@sybase.com
From: AA
Newsgroups: ianywhere.public.general
Subject: ORDER BY in UNION doesn't allow col name?
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4149b686.706c.1681692777@sybase.com>
X-Original-NNTP-Posting-Host: 10.22.241.42
X-Original-Trace: 16 Sep 2004 08:51:34 -0700, 10.22.241.42
Lines: 24
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 16 Sep 2004 08:31:54 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 16 Sep 2004 08:44:08 -0700
X-Trace: forums-1-dub 1095349448 10.22.108.75 (16 Sep 2004 08:44:08 -0700)
X-Original-Trace: 16 Sep 2004 08:44:08 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:3565
Article PK: 7471

The following SQL works:

select emp_fname 'FName'
from employee
union
select first_name 'FName'
from contact
order by 1

but the following doesn't:

select emp_fname 'FName'
from employee
union
select first_name 'FName'
from contact
order by Fname

ASE, MSS, and ORA all support both versions and the
developers want to know why is ASA the odd man out!?!

Any insight greatly appreciated.

tia


Mark Culp Posted on 2004-09-16 16:23:54.0Z
Message-ID: <4149BB3C.87219C9@iAnywhere.com>
From: Mark Culp <reply_to_newsgroups_only_please_nospam_mark.culp@iAnywhere.com>
X-Mailer: Mozilla 4.75 [en] (Windows NT 5.0; U)
X-Accept-Language: en
MIME-Version: 1.0
Newsgroups: ianywhere.public.general
Subject: Re: ORDER BY in UNION doesn't allow col name?
References: <4149b686.706c.1681692777@sybase.com>
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
X-Original-NNTP-Posting-Host: mculp-xp.sybase.com
X-Original-Trace: 16 Sep 2004 09:31:21 -0700, mculp-xp.sybase.com
Lines: 39
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 16 Sep 2004 09:11:41 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 16 Sep 2004 09:23:54 -0700
X-Trace: forums-1-dub 1095351834 10.22.108.75 (16 Sep 2004 09:23:54 -0700)
X-Original-Trace: 16 Sep 2004 09:23:54 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:3567
Article PK: 7466

What version and build number are you using? I tried you question
on the asademo.db with 9.0.1.1877 and it worked just fine.
--
Mark Culp
ASA Research and Development
-------------------------------------------------------------------------
** Whitepapers, TechDocs, bug fixes are all available through the **
** iAnywhere Developer Community at http://www.ianywhere.com/developer **
-------------------------------------------------------------------------
* <<<<< Please always include the ASA version and build number >>>>> *
* <<<<< _and_ the operating system version that you are using >>>>> *
-------------------------------------------------------------------------

AA wrote:
>
> The following SQL works:
>
> select emp_fname 'FName'
> from employee
> union
> select first_name 'FName'
> from contact
> order by 1
>
> but the following doesn't:
>
> select emp_fname 'FName'
> from employee
> union
> select first_name 'FName'
> from contact
> order by Fname
>
> ASE, MSS, and ORA all support both versions and the
> developers want to know why is ASA the odd man out!?!
>
> Any insight greatly appreciated.
>
> tia


AA Posted on 2004-09-20 17:38:44.0Z
Sender: 28c3.412ac4a3.1804289383@sybase.com
From: AA
Newsgroups: ianywhere.public.general
Subject: Re: ORDER BY in UNION doesn't allow col name?
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <414f1771.3562.1681692777@sybase.com>
References: <4149BB3C.87219C9@iAnywhere.com>
X-Original-NNTP-Posting-Host: 10.22.241.42
X-Original-Trace: 20 Sep 2004 10:46:25 -0700, 10.22.241.42
Lines: 51
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 20 Sep 2004 10:26:06 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 20 Sep 2004 10:38:44 -0700
X-Trace: forums-1-dub 1095701924 10.22.108.75 (20 Sep 2004 10:38:44 -0700)
X-Original-Trace: 20 Sep 2004 10:38:44 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:3592
Article PK: 7493

I am using:

Sybase ASA Database Engine Version 8.0.2.4218. I wonder if
this fix is available in any pre-9.0.x release.

Thx Mark and Anil for replying to my post.

-a

> What version and build number are you using? I tried you
> question on the asademo.db with 9.0.1.1877 and it worked
> just fine. --
> Mark Culp
> ASA Research and Development
> ----------------------------------------------------------
> --------------- ** Whitepapers, TechDocs, bug fixes are
> all available through the ** ** iAnywhere Developer
> Community at http://www.ianywhere.com/developer **
> ----------------------------------------------------------
> --------------- * <<<<< Please always include the ASA
> version and build number >>>>> * * <<<<< _and_ the
> operating system version that you are using >>>>> *
> ----------------------------------------------------------
> ---------------
>
> AA wrote:
> >
> > The following SQL works:
> >
> > select emp_fname 'FName'
> > from employee
> > union
> > select first_name 'FName'
> > from contact
> > order by 1
> >
> > but the following doesn't:
> >
> > select emp_fname 'FName'
> > from employee
> > union
> > select first_name 'FName'
> > from contact
> > order by Fname
> >
> > ASE, MSS, and ORA all support both versions and the
> > developers want to know why is ASA the odd man out!?!
> >
> > Any insight greatly appreciated.
> >
> > tia


"guest" guest Posted on 2005-03-13 01:19:20.0Z
From: "guest" guest@anonymous.com
ReplyTo: guest@anonymous.com
Subject: RE:Re: ORDER BY in UNION doesn't allow col name?
Newsgroups: ianywhere.public.general
X-Newsreader: NNTP
References: <4149BB3C.87219C9@iAnywhere.com>
Organization: Personal
X-Original-NNTP-Posting-Host: accf8e22.ipt.aol.com
Message-ID: <42339514@forums-2-dub>
X-Original-Trace: 12 Mar 2005 17:19:16 -0800, accf8e22.ipt.aol.com
Lines: 40
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 12 Mar 2005 17:19:16 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 12 Mar 2005 17:19:20 -0800
X-Trace: forums-1-dub 1110676760 10.22.108.75 (12 Mar 2005 17:19:20 -0800)
X-Original-Trace: 12 Mar 2005 17:19:20 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:4216
Article PK: 8090


> What version and build number are you using? I tried you question
> on the asademo.db with 9.0.1.1877 and it worked just fine.
> --
> Mark Culp
> ASA Research and Development
> -------------------------------------------------------------------------
> ** Whitepapers, TechDocs, bug fixes are all available through the **
> ** iAnywhere Developer Community at http://www.ianywhere.com/developer **
> -------------------------------------------------------------------------
> * <<<<< Please always include the ASA version and build number >>>>> *
> * <<<<< _and_ the operating system version that you are using >>>>> *
> -------------------------------------------------------------------------
>
> AA wrote:
> >
> > The following SQL works:
> >
> > select emp_fname 'FName'
> > from employee
> > union
> > select first_name 'FName'
> > from contact
> > order by 1
> >
> > but the following doesn't:
> >
> > select emp_fname 'FName'
> > from employee
> > union
> > select first_name 'FName'
> > from contact
> > order by Fname
> >
> > ASE, MSS, and ORA all support both versions and the
> > developers want to know why is ASA the odd man out!?!
> >
> > Any insight greatly appreciated.
> >
> > tia


anil k goel Posted on 2004-09-16 16:20:09.0Z
From: "anil k goel" <firstname.no-junk.lastname@spam.ianywhere.com>
Newsgroups: ianywhere.public.general
References: <4149b686.706c.1681692777@sybase.com>
Subject: Re: ORDER BY in UNION doesn't allow col name?
Lines: 40
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2180
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2180
X-Original-NNTP-Posting-Host: anilgoel-pc.sybase.com
Message-ID: <4149bef7@forums-2-dub>
X-Original-Trace: 16 Sep 2004 09:27:35 -0700, anilgoel-pc.sybase.com
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 16 Sep 2004 09:07:55 -0700, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 16 Sep 2004 09:20:09 -0700
X-Trace: forums-1-dub 1095351609 10.22.108.75 (16 Sep 2004 09:20:09 -0700)
X-Original-Trace: 16 Sep 2004 09:20:09 -0700, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:3566
Article PK: 7472

Seems to work for me. What error do you get? What version and build of ASA
are you using.

--
-anil
Research and Development, Query Processing
iAnywhere Solutions Engineering

-------------------------------------------------------------------------
** Whitepapers, TechDocs, bug fixes are all available through the **
** iAnywhere Developer Community at http://www.ianywhere.com/developer **
-------------------------------------------------------------------------

<AA> wrote in message news:4149b686.706c.1681692777@sybase.com...
> The following SQL works:
>
> select emp_fname 'FName'
> from employee
> union
> select first_name 'FName'
> from contact
> order by 1
>
> but the following doesn't:
>
> select emp_fname 'FName'
> from employee
> union
> select first_name 'FName'
> from contact
> order by Fname
>
> ASE, MSS, and ORA all support both versions and the
> developers want to know why is ASA the odd man out!?!
>
> Any insight greatly appreciated.
>
> tia