Re: INSERT INTO with SELECT

From: Lothar Armbruester <lothar.armbruester_at_rheingau.netsurf.de>
Date: 1998/01/27
Message-ID: <890.331T2664T12344967_at_rheingau.netsurf.de>#1/1


On 26-Jan-98 15:04:09 David Small wrote:

>Hi-
 

> If I use an INSERT INTO clause, followed be a SELECT clause, followed by
>an ORDER BY clause I receive an error message ("SQL command not properly
>ended"). If I remove the ORDER BY clause, the statement works fine. Is
>there a way to include the ORDER BY clause in Oracle? Most other RDBMS's
>permit it in the INSERT INTO/SELECT statements.

I think it is not possible. By definition, tables do not have an implicit order. So something like

insert into ... order by ...

would just set the order in which the rows are inserted but this does generally not determine the order when selecting from the new table.

>Thanks-
 

>David Small
>Blessing/White, Inc.

Hope that helps,
Lothar

--
Lothar Armbrüster       | lothar.armbruester_at_rheingau.netsurf.de
Schulstr. 12            | lothar.armbruester_at_t-online.de
D-65375 Oestrich-Winkel |
Received on Tue Jan 27 1998 - 00:00:00 CET

Original text of this message