create table as fails

Franck Routier franck.routier at
Mon Jul 8 11:41:48 CEST 2013


I am trying to create a table as select, but it fails...

Here is the statement:

create table imagerie_ft as
select dwhdim.*, dwhq135.q135
from dwhdim join dwhq135 on dwhdim.dwhcolcsu = dwhq135.dwhcolcsu;

The select alone works fine.
The same statement with create view instead of create table works fine.

But the create table fails with:

Error: syntax error, unexpected SCOLON, expecting WITH in: "create table 
imagerie_ft as
SQLState:  42000
ErrorCode: 0
Error: select dwhdim.*, dwhq135.q135
SQLState:  22000
ErrorCode: 0
Error: from dwhdim join dwhq135 on dwhdim.dwhcolcsu = dwhq135.dwhcolcsu;"
SQLState:  22000
ErrorCode: 0

Should I report a bug, or is using the * in the statement for a create 
table a non supported sql idiom?

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 4477 bytes
Desc: Signature cryptographique S/MIME
URL: <>

More information about the users-list mailing list