Reputation: 31
I am trying to create a view with Majors and Minors w/ upper case, but Oracle keeps giving me an error. What am I doing wrong?
CREATE VIEW A5T4 AS
SELECT StudentID, Major1, Major2, Minor
FROM A5
WHERE UPPER(Major1, Major2, Minor)
ORDER BY StudentID;
The error is: Error report -
SQL Error: ORA-00909: invalid number of arguments
00909. 00000 - "invalid number of arguments"
*Cause:
*Action:
Upvotes: 0
Views: 15149
Reputation: 3548
The error is in the where clause. If you want your fields with upper case, use the function in the SELECT clause, not in the WHERE clause.
Try this :
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);
Upvotes: 3