我正在尝试使用大写的Majors和Minors创建一个视图,但Oracle一直给我一个错误。我做错了什么?
创建视图A5T4 AS
SELECT StudentID,Major1,Major2,Minor
来自A5
WHERE UPPER(Major1,Major2,Minor)
按学生ID排序;
错误是:错误报告 -
SQL错误:ORA-00909:参数数量无效
00909. 00000 - “参数数量无效”
*原因:
*操作:
答案 0 :(得分:1)
错误发生在where子句中。如果希望字段为大写,请使用SELECT子句中的函数,而不是WHERE子句中的函数。
试试这个:
CREATE VIEW
A5T4
AS
SELECT
UPPER(StudentID) AS "StudentID",
UPPER(Major1) AS "Major1",
UPPER(Major2) AS "Major2",
UPPER(Minor) AS "Minor"
FROM
A5
ORDER BY
UPPER(StudentID);