Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.server -> Re: Using order by with union

Re: Using order by with union

From: TurkBear <johng_at_mm.com>
Date: Thu, 14 Oct 1999 17:52:50 GMT
Message-ID: <3807181e.15100623@super.news-ituk.to>


Use the desc qualifier,

select word,num from wordtable minus select word,num from wordtable2 order by num desc;

Chris Seline <seline_at_2wrongs.com> wrote:

>I have switched from using one table to two for my queries, but I have
>run into a problem using order by
>
>I would like to use this query across two tables
>select word,num from wordtable order by -num;
>
>like this
>
>select word,num from wordtable union select word,num from wordtable2
>order by -num;
>
>but it says that "ORDER BY item must be the number of a SELECT-list
>expression"
>
>the same query using num instead of -num works fine, but I just need it
>to come out in the
>reverse order
>
>also,
>select word,-num from wordtable union select word,num from wordtable2
>order by num;
>does not work either
>
>anyone who knows how to solve this is cool

  -----------== Posted via Newsfeeds.Com, Uncensored Usenet News ==----------    http://www.newsfeeds.com The Largest Usenet Servers in the World! ------== Over 73,000 Newsgroups - Including Dedicated Binaries Servers ==----- Received on Thu Oct 14 1999 - 12:52:50 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US