🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.interbase.sql
Article #617

Re: union with order by

#617
From: John Hart
Date: Wed, 29 Aug 2007 03:47
49 lines
2056 bytes
Thank you. I forgot to mention I did check the internet and the IB 
documents.


"Robin" <Robin@.com> wrote in message 
news:46d4e240$1@newsgroups.borland.com...
> John Hart wrote:
>> Hi, I want to merge two or more tables and order them but I can't seem to 
>> get it to work, below is a simplified sql that I tried after my original 
>> one failed.
>
> Hi John,
>
> Reference the fields you want to order by with their sequence number 
> rather then the fields name.
>
> Ie:
>
> select
> name, created
> from
> TWSUPPLIER
>
> union
>
> select
> name, created
> from
> TWCUSTOMER
>
> union
>
> select
> mydesc as name, created
> from
> TWPRODUCT
>
> order by
> 2
>
> Also, make sure that mydesc and two name fields are the same type.
>
> If you still have trouble, be sure to post the error message you get :-)
>
> -- 
> Robin.
>
> Australian Bridal Accessories := http://www.bridalbuzz.com.au
> Turbo for Noobs (a work in progress) := http://turbofornoobs.blogspot.com/ 
Technical Details
Message-ID: <46d4ec5f$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <46d4dfbd$1@newsgroups.borland.com> <46d4e240$1@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,2606ab9c57d082e6
X-Google-Attributes: gid114a0e,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "John Hart" <twsjohn@optusnet.com.au>
Newsgroups: borland.public.interbase.sql
References: <46d4dfbd$1@newsgroups.borland.com> <46d4e240$1@newsgroups.borland.com>
Subject: Re: union with order by
Date: Wed, 29 Aug 2007 13:47:38 +1000
Lines: 51
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Response
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3138
X-Antivirus: avast! (VPS 000769-1, 28/08/2007), Outbound message
X-Antivirus-Status: Clean
NNTP-Posting-Host: 58.110.127.73
Message-ID: <46d4ec5f$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1188359263 58.110.127.73 (28 Aug 2007 20:47:43 -0700)
Path: arc1-ca.pugleaf.net!g2news2.google.com!news2.google.com!border1.nntp.dca.giganews.com!nntp.giganews.com!newsfeed00.sul.t-online.de!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail