ORA-00911: invalid character; in sqlplus

[复制链接]
查看11 | 回复0 | 2005-3-14 15:14:00 | 显示全部楼层 |阅读模式
using sh schema do the following

SQL> select* from product_component_version;
PRODUCT
--------------------------------------------------------------------------------
VERSION
--------------------------------------------------------------------------------
STATUS
--------------------------------------------------------------------------------
NLSRTL
10.1.0.2.0
Production
Oracle Database 10g Enterprise Edition
10.1.0.2.0
Prod
PL/SQL
10.1.0.2.0
Production
TNS for 32-bit Windows:
10.1.0.2.0
Production

SQL>create view vw_sales as
2select country_name country, prod_name product,year, sales from
3(select country_id, prod_id, year, sum(quantity_sold) sales
4 from
5 (select prod_id, cust_id, to_char(time_id, 'yyyy') year,
6 quantity_sold from sales) a
7join
8 customers using(cust_id)
9 group by country_id, prod_id, year) x
10natural join countries
11natural join products
12/
View created.
SQL> desc w_sales;
ERROR:
ORA-04043: object w_sales does not exist

SQL> desc vw_sales;
Name
Null?Type
----------------------------------------- -------- ----------------------------
COUNTRY
NOT NULL VARCHAR2(40)
PRODUCT
NOT NULL VARCHAR2(50)
YEAR
VARCHAR2(4)
SALES
NUMBER
SQL> select * from vw_sales;
select * from vw_sales
*
ERROR at line 1:
ORA-00911: invalid character

SQL> select sales from vw_sales;
select sales from vw_sales;

*
ERROR at line 1:
ORA-00911: invalid character
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

主题

0

回帖

4882万

积分

论坛元老

Rank: 8Rank: 8

积分
48824836
热门排行