Re: CREATE TABLE AS and ORDER BY

From: Jie Liang <jliang(at)ipinc(dot)com>
To: Joy Chuang <hxc0850(at)omega(dot)uta(dot)edu>
Cc: pgsql-sql(at)postgresql(dot)org
Subject: Re: CREATE TABLE AS and ORDER BY
Date: 2001-02-06 18:13:04
Message-ID: Pine.BSF.4.10.10102061011100.45535-100000@tidal.ipinc.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Hey,

Try:

select e.studentid, u.hoursxfer into freshhr21
from enrollmentstatus e, undergradclass u
where e.studentid = u.studentid and e.classtd = '1'
order by u.hoursxfer

Jie LIANG

Internet Products Inc.

10350 Science Center Drive
Suite 100, San Diego, CA 92121
Office:(858)320-4873

jliang(at)ipinc(dot)com
www.ipinc.com

On Mon, 5 Feb 2001, Joy Chuang wrote:

> Hi,
>
> I tried to use CREATE TABLE AS and ORDER BY. The query is as followed:
>
> create table freshhr21 as
> select e.studentid, u.hoursxfer
> from enrollmentstatus e, undergradclass u
> where e.studentid = u.studentid and e.classtd = '1'
> order by u.hoursxfer
>
> But, it returns error message "ERROR: parser: parse error at or near
> "order"". Does "create table as" support "order by" inside of it?
>
> I am using PostgreSQL 6.5.3.
>
> Thank you.
>
> Joy Chuang
>

In response to

Browse pgsql-sql by date

  From Date Subject
Next Message Jie Liang 2001-02-06 18:18:58 Re: Search
Previous Message Brice Ruth 2001-02-06 18:07:03 Re: SQL Join - MySQL/PostgreSQL difference?