By definition, this error is caused by that an entry is formatted like a function call, but it is not recognized as an Oracle Function. Below are some of the situations that will cause the error.
1. Miss spelling of an existing function. For example, you want to count the occurrences of an column, instead of using count(col), you miss typed it as cunt(col).
2. The called function does not exist in your database. For example, you have an integer column cost in your product table, you want to add 10 to all the cost in your report, and here is the query.
Select addTen(cost) as cost from product;
You will get the java.sql.SQLSyntaxErrorException: ORA-00919: invalid function error if in your database you don't have the addTen(INT param) function.
3. A comma is replaced by a period. For example, you want to insert a row into your product table, and here is your SQL.
Insert into product (?, ?. ?, ?, ?);
Because you have an "." instead of a "," after the second question mark, you will get this error.
References:
1. Oracle Error Message
2. http://ora-00919.ora-code.com/
1. Miss spelling of an existing function. For example, you want to count the occurrences of an column, instead of using count(col), you miss typed it as cunt(col).
2. The called function does not exist in your database. For example, you have an integer column cost in your product table, you want to add 10 to all the cost in your report, and here is the query.
Select addTen(cost) as cost from product;
You will get the java.sql.SQLSyntaxErrorException: ORA-00919: invalid function error if in your database you don't have the addTen(INT param) function.
3. A comma is replaced by a period. For example, you want to insert a row into your product table, and here is your SQL.
Insert into product (?, ?. ?, ?, ?);
Because you have an "." instead of a "," after the second question mark, you will get this error.
References:
1. Oracle Error Message
2. http://ora-00919.ora-code.com/
-----------------------------------------------------------------------------------------------------------------
Watch the blessing and loving online channel: SupremeMasterTV live
If you have ever asked yourself these questions, this is the book for you. What is the meaning of life? Why do people suffer? What is in control of my life? Why is life the way it is? How can I stop suffering and be happy? How can I have a successful life? How can I have a life I like to have? How can I be the person I like to be? How can I be wiser and smarter? How can I have good and harmonious relations with others? Why do people meditate to achieve enlightenment? What is the true meaning of spiritual practice? Why all beings are one? Read the book for free here.
No comments:
Post a Comment