Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

ORA-00933 sql command not properly ended ( in insert query )

I want the following query to be executed but it gives me an error.

insert into personal_info (case_type) values ('unknown') where case_description like '%normal%';

But when I am running the following query it gives me no errors.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

select * from personal_info where case_description like '%normal%';

>Solution :

It is not INSERT you’re looking for, but UPDATE:

update personal_info set 
  case_type = 'unknown'
  where case_description like '%normal%';

If it were insert, then you’d just

insert into personal_info (case_type) values ('unknown');

as insert – using values – can’t contain a where clause.

Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading