🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: INSERT INTO with SELECT

#11092
From: Bill Todd
Date: Thu, 12 Dec 2002 15:34
32 lines
1707 bytes
Use an ORDER BY clause when you select records from PROJECTS. That is
the only way to ensure that the records are returned in any particular
order.

On Thu, 12 Dec 2002 21:35:34 +0800, "TR@SOE" <tr@netease.com> wrote:

>INSERT INTO PROJECTS
>SELECT * FROM NEW_PROJECTS
>WHERE NEW_PROJECTS.START_DATE > ��6-JUN-1994��;
>
>I know the above can work. But my question is:
>
>Can I add an "ORDER BY" to the SELECT? If yes, how? Something like:
>
>INSERT INTO PROJECTS
>SELECT * FROM NEW_PROJECTS
>ORDER BY ...
>
>doesn't work.
>
>If not, what to do if I want to insert into one table with some rows from
>another dataset which is somehow sorted?
>
>Rgds!
>
>TR@SOE
>


--
Bill (TeamB)
(TeamB cannot respond to questions received via email)
Technical Details
Message-ID: <91bhvucg0usgal58fnet61f5d3q055cmk5@4ax.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail
References: <3df890a9@newsgroups.borland.com>

Show Full Headers
Complete Article Headers
X-Google-Language: ENGLISH,ASCII
X-Google-Thread: 114a0e,6bb88fb582a62a8a
X-Google-Attributes: gid114a0e,public
X-Google-ArrivalTime: 2002-12-12 07:39:58 PST
From: Bill Todd <bill@notthis.dbginc.com>
Newsgroups: borland.public.interbase.sql
Subject: Re: INSERT INTO with SELECT
Date: Thu, 12 Dec 2002 08:34:15 -0700
Message-ID: <91bhvucg0usgal58fnet61f5d3q055cmk5@4ax.com>
References: <3df890a9@newsgroups.borland.com>
X-Newsreader: Forte Agent 1.91/32.564
MIME-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 8bit
NNTP-Posting-Host: 216.207.211.30
X-Trace: newsgroups.borland.com 1039707257 216.207.211.30 (12 Dec 2002 07:34:17 -0800)
Lines: 32
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-08!supernews.com!newsfeed.news2me.com!newsfeed.freenet.de!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail