Article View: borland.public.interbase.sql
Article #11094Re: INSERT INTO with SELECT
From: Craig Stuntz TeamB
Date: Thu, 12 Dec 2002 16:02
Date: Thu, 12 Dec 2002 16:02
25 lines
1924 bytes
1924 bytes
In article <3df890a9@newsgroups.borland.com>, tr@netease.com says... > 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? No. > If not, what to do if I want to insert into one table with some rows from > another dataset which is somehow sorted? What is your goal? SQL tables have no order. The only order you can expect is when you specify an ORDER BY when you SELECT the data you've inserted. -Craig -- Craig Stuntz [TeamB] � Vertex Systems Corp. � Columbus, OH Delphi/InterBase Weblog : http://delphi.weblogs.com InterBase Perf. Monitor : http://delphi.weblogs.com/IBPerformanceMonitor InterBase PLANalyzer 1.1: http://delphi.weblogs.com/IBPLANalyzer
Technical Details
Message-ID:
<MPG.186278274ea56a1a98a3ba@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-08!supernews.com!38.144.126.75.MISMATCH!feed1.newsreader.com!newsreader.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!proxad.net!fr.clara.net!heighliner.fr.clara.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 08:11:13 PST From: Craig Stuntz [TeamB] <cstuntz@nospamplease.com (but use vertexsoftware to email)> Newsgroups: borland.public.interbase.sql Subject: Re: INSERT INTO with SELECT Date: Thu, 12 Dec 2002 11:02:27 -0500 Message-ID: <MPG.186278274ea56a1a98a3ba@newsgroups.borland.com> References: <3df890a9@newsgroups.borland.com> Organization: Vertex Systems Corporation X-Newsreader: MicroPlanet Gravity v2.60 NNTP-Posting-Host: 65.86.87.242 X-Trace: newsgroups.borland.com 1039708956 65.86.87.242 (12 Dec 2002 08:02:36 -0800) Lines: 25 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!38.144.126.75.MISMATCH!feed1.newsreader.com!newsreader.com!news-spur1.maxwell.syr.edu!news.maxwell.syr.edu!newsfeed.icl.net!newsfeed.fjserv.net!proxad.net!proxad.net!fr.clara.net!heighliner.fr.clara.net!newsfeed01.sul.t-online.de!t-online.de!newsgroups.borland.com!not-for-mail