🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

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

Re: INSERT INTO with SELECT

#11120
From: TR
Date: Fri, 13 Dec 2002 12:48
40 lines
2230 bytes
Thank you for all your valuable input. I have been developing database
application for years so I am not that newbie.

Maybe I did not put my question very clear so everyone is confused with my
intention. Let met put it this way:

Let's say PROJECTS is a table created from an external file: abc.txt. While
NEW_PROJECTS is a corresponding internal table. After some manipulation in
the NEW_PROJECTS table, I want to export the changes made back to the
PROJECTS table (and thus reflect the change in abc.txt). Then my concern to
export the data in a certain order makes perfect sense.

Tks for any input.

TR@SOE


"TR@SOE" <tr@netease.com> д����Ϣ����:3df890a9@newsgroups.borland.com...
> 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
>
>
Technical Details
Message-ID: <3df9d71a@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!easynet-quince!easynet.net!colt.net!news-lond.gip.net!news.gsl.net!gip.net!newsfeed.icl.net!newsfeed.fjserv.net!lnewspeer00.lnd.ops.eu.uu.net!emea.uu.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-13 05:15:51 PST
From: "TR@SOE" <tr@netease.com>
Newsgroups: borland.public.interbase.sql
References: <3df890a9@newsgroups.borland.com>
Subject: Re: INSERT INTO with SELECT
Date: Fri, 13 Dec 2002 20:48:26 +0800
Lines: 42
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2720.3000
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2600.0000
NNTP-Posting-Host: 211.167.135.132
Message-ID: <3df9d71a@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1039783706 211.167.135.132 (13 Dec 2002 04:48:26 -0800)
Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-03!sn-xit-06!sn-xit-08!supernews.com!easynet-quince!easynet.net!colt.net!news-lond.gip.net!news.gsl.net!gip.net!newsfeed.icl.net!newsfeed.fjserv.net!lnewspeer00.lnd.ops.eu.uu.net!emea.uu.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail