Article View: borland.public.interbase.sql
Article #11091Re: INSERT INTO with SELECT
From: Martijn Tonies
Date: Thu, 12 Dec 2002 15:18
Date: Thu, 12 Dec 2002 15:18
35 lines
1931 bytes
1931 bytes
Unless you're using the ROWS clause there's no need to use an ORDER BY. Rows are never sorted in a table, only the output (resultset) can be sorted - IF you use an ORDER BY clause. -- With regards, Martijn Tonies InterBase Workbench - the developer tool for InterBase & Firebird Firebird Workbench - the developer tool for Firebird Upscene Productions http://www.upscene.com "This is an object-oriented system. If we change anything, the users object." > 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?
Technical Details
Message-ID:
<3df8a822$1@newsgroups.borland.com>Path:
arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!news.stealth.net!news.stealth.net!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mailReferences:
<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:57 PST From: "Martijn Tonies" <m.tonies@upscene_remove.com> Newsgroups: borland.public.interbase.sql References: <3df890a9@newsgroups.borland.com> Subject: Re: INSERT INTO with SELECT Date: Thu, 12 Dec 2002 16:18:39 +0100 Lines: 37 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1106 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106 NNTP-Posting-Host: 212.238.179.102 Message-ID: <3df8a822$1@newsgroups.borland.com> X-Trace: newsgroups.borland.com 1039706146 212.238.179.102 (12 Dec 2002 07:15:46 -0800) Path: arc1-ca.pugleaf.net!archiver1.google.com!news1.google.com!sn-xit-02!sn-xit-03!sn-xit-01!sn-xit-09!supernews.com!newshosting.com!news-xfer1.atl.newshosting.com!news.stealth.net!news.stealth.net!eusc.inter.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail