List:MaxDB« Previous MessageNext Message »
From:Alejandro D. Burne Date:October 15 2003 11:33am
Subject:Temporary tables
View as plain text  
Thanks, now I've another question, I don't know if here is the right place
to do this, if not just tell me.

I want to create a temporary table and make a primary key on it (unique
index may work also) but makes an error.

CREATE TABLE temp.a AS
SELECT field1, field2 FROM table1 WHERE...
//
ALTER TABLE temp.a ADD PRIMARY KEY (field1)
//
---- Error -------------------------------
Auto Commit: On, SQL Mode: Internal, Isolation Level: Committed
General error;-9205 POS(1) System error: AK Catalog information not
found:0000000000000004004100.
alter table temp.a add primary key (field1)
(field1 is pk on table 1)


or:

CREATE TABLE temp.a AS
SELECT field1, field2 FROM table1 WHERE...
//
CREATE INDEX ix1 ON temp.a (field1)
//
---- Error -------------------------------
to Commit: On, SQL Mode: Internal, Isolation Level: Committed
Syntax error or access violation;-5001 POS(26) Missing privilege:INDEX.
create index ix1 on temp.a (field1)
Attachment: [text/html]
Attachment: [text/html]
Thread
Translate SQL script from MySQL to MaxDBAlejandro D. Burne14 Oct
  • Re: Translate SQL script from MySQL to MaxDBYves Trudeau14 Oct
RE: Translate SQL script from MySQL to MaxDBElke Zabach15 Oct
  • Temporary tablesAlejandro D. Burne15 Oct
RE: Temporary tablesHolger Becker15 Oct
RE: Temporary tablesDavid N. Heydon23 Oct