[Webinar] Streamline your web hosting managementRegister Today

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2521
  • Last Modified:

PL/SQL: ORA-00928: missing SELECT keyword

insert into OUTSTANDING_EMP_IDS(DOC_TYPE,REFID_1,REFID_2,REFID_3)
            VALUES ('EX','','','');

When i execute i am getting abobe exception;

instead of  'EX' in DOC_TYPE if i put other value its not giving any error;Is it a bug in 10.2.0.1 version?
0
chaitu chaitu
Asked:
chaitu chaitu
1 Solution
 
mohammedfCommented:
it seems it is a bug !!!
are u using SQL+ or for builder ?
0
 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
how do you run this code?

what about this:

insert into OUTSTANDING_EMP_IDS(DOC_TYPE,REFID_1,REFID_2,REFID_3)
            SELECT 'EX','','','' FROM DUAL;

Open in new window

0
 
chaitu chaituAuthor Commented:
when i write like this its inserting in pl/sql developer.
insert into OUTSTANDING_EMP_IDS(DOC_TYPE,REFID_1,REFID_2,REFID_3)
            SELECT 'EX','','','' FROM DUAL;
 
but below one is giving problem in pl/sql developer.;through sql plus its inserting;i think its problem with the pl/sql developer.what was the reason?i am using  7.0.3 version.

insert into OUTSTANDING_EMP_IDS(DOC_TYPE,REFID_1,REFID_2,REFID_3)
           values('EX','','','');;
0
Never miss a deadline with monday.com

The revolutionary project management tool is here!   Plan visually with a single glance and make sure your projects get done.

 
Guy Hengel [angelIII / a3]Billing EngineerCommented:
I have no idea, is this really only when you have 'EX' as value, any other string works?
0
 
SJT2003ACommented:
Try giving null instead of just a couple of single quotes for REFID fields. .

Try like:

insert into OUTSTANDING_EMP_IDS(DOC_TYPE,REFID_1,REFID_2,REFID_3)
            VALUES ('EX',null, null, null');

Here I assume you want to store null for REFID fields and they are NULLABLE.
Check it out. Good luck :)
0
 
schwertnerCommented:
If you do not provide values for some columns you do not need to mention them.

insert into OUTSTANDING_EMP_IDS(DOC_TYPE )
            VALUES ('EX');

The only valid test bed is SQL*Plus.
Other GUIs like SQLDeveloper, PL/SQL Developer, TOAD
have more then enough bugs.
0

Featured Post

The new generation of project management tools

With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now