"Robert Bengtsson" <[EMAIL PROTECTED]> writes:
> while the following generates an error:

> CREATE TABLE l_modeltext
> (
>   id serial NOT NULL,
>   text varchar(60),
>   make varchar(30),
>   model varchar(30),
>   make_id int4,
>   model_id int4
> ) WITHOUT OIDS AS (SELECT distinct modeltext as text, make, model, make_id,
> model_id from l_modelcode);

That is not the syntax for CREATE TABLE AS, and I don't see anything in
the reference page for CREATE TABLE AS that would suggest that it is.

I'd suggest creating the table with the columns you want and then doing
INSERT ... SELECT to fill it.

                        regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
       subscribe-nomail command to [EMAIL PROTECTED] so that your
       message can get through to the mailing list cleanly

Reply via email to