我在 pl/sql里的command window 里运行下边语句,会自动多出来 我用-------标示的东西 此语句是我在 pl/sql 用 expopt user objects 导出的
SQL> 
SQL> create or replace view v_page_base as
  2  select t.action_id action_id,
  3  t.unit_sid unit_sid
  4  ,t.page_id page_id
  5  ,page_name,page_ratio,item_ratio,
  6  round(sum(value)/count(*),8) VALUE,
  7  t1.hsum hsum
  8   from v_item_base t,
  9   (
SQL>  select page_id,unit_sid,count(*) hsum from
  2   (select page_id,unit_sid,username from wkee_results group by page_id,unit_sid,username)
  3   t100 group by page_id,unit_sid
SQL>  ) t1
  2   where t.unit_sid = t1.unit_sid and t.page_id = t1.page_id
  3  group by t.action_id,t.unit_sid,t.page_id,page_name,page_ratio,item_ratio,t1.hsum
  4  WITH READ ONLY;-----------------------------------------------------------------------------------
) t1
 where t.unit_sid = t1.unit_sid and t.page_id = t1.page_id
group by t.action_id,t.unit_sid,t.page_id,page_name,page_ratio,item_ratio,t1.hsum
WITH READ ONLY
此段为重复 上面多出的
--------------------------------------------------------------------------------
ORA-00900: 无效 SQL 语句SQL> 

解决方案 »

  1.   

    用Sql window 运行就没有错误,我一起导出了好几个试图,就这个报错
      

  2.   

    sql中存在空行吧!!
    你在plsql中执行的代码的行号非连续啊,你执行的create view被分解成三个sql了(有三个SQL>提示).修改一下你的创建视图的代码,应该就没有问题了。
      

  3.   

    sql中存在空行吧!!
    你在plsql中执行的代码的行号非连续啊,你执行的create view被分解成三个sql了(有三个SQL>提示).修改一下你的创建视图的代码,应该就没有问题了。