Thursday, November 13, 2014

SQLException: ORA-00984: column not allowed here

The exception occurs when assigning value for inserting or updating records and value given is not properly presented.

The following queries throw such an exception.

String name = "Apple";

1. INSERT INTO FRUIT (NAME, PRICE) values (name, 1.68);

2. UPDATE FRUIT set NAME=name where PRICE=1.68;

To Fix them, do the following.

1. INSERT INTO FRUIT (NAME, PRICE) values ("'"+name+"'", 1.68);

2. UPDATE FRUIT set NAME= "'"+name+"'" where PRICE=1.68;

----------------------------------------------------------------------------------------------------------------

                        
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 free here.


No comments:

Post a Comment