[Babase] Saving query output as a table

Catherine Markham amarkham at princeton.edu
Thu Jun 1 10:13:55 EDT 2006


Hi Karl and Leah,

Any ideas for what I'm doing wrong with the following?  I'm trying to 
save the output of a query as a table and can't tell if my commands are 
off or if it is simply a matter of permissions (I'm thinking the latter 
based on the specific message that I get with the error).

All I did was add the first line (the rest was Karl's query and works 
fine for me so long as I don't try and save the output).

Thanks,
Catherine


SQL error:

ERROR:  permission denied for schema babase

In statement:

create table table_name as
select cycles.cid
      , cycles.sname
      , cycles.seq
      , mds.date as mdate
      , mds.edate as emdate
      , mds.ldate as lmdate
      , tds.date as tdate
      , tds.edate as etdate
      , tds.ldate as ltdate
      , dds.date as ddate
      , dds.edate as eddate
      , dds.ldate as lddate
   from cycles
    left outer join cycpoints as mds on (mds.cid = cycles.cid
                                         and mds.code = 'M')
    left outer join cycpoints as tds on (tds.cid = cycles.cid
                                         and tds.code = 'T')
    left outer join cycpoints as dds on (dds.cid = cycles.cid
                                         and dds.code = 'D')
   order by cycles.sname, cycles.seq;



More information about the Babase mailing list