Solved

PL/SQL: ORA-00933: SQL command not properly ended on line 4

Posted on 2004-10-11
3
39,969 Views
Last Modified: 2012-05-05
I have the following PL/SQL procdure.  I do not find any error in it.  Please help me in this regard

**************************PL/SQL********************************
DECLARE
TEMP_OBJECT CHAR(10);
BEGIN
   SELECT SIOBNM FROM SLTEST.F9860 into TEMP_OBJECT WHERE SIUPMJ = 104234;
   IF TEMP_OBJECT <> 0 THEN
      TEMP_OBJECT := "F4211";
   ELSE
      TEMP_OBJECT := "F4201";
   END IF;
COMMIT;
   
END;

*************************Error***********************************
PL/SQL: ORA-00933: SQL command not properly ended on line 4
0
Comment
Question by:tgatif
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 20

Accepted Solution

by:
dsacker earned 250 total points
ID: 12281664
Look closer.

Put your "into" statement BEFORE your "from" statement.
0
 
LVL 23

Expert Comment

by:seazodiac
ID: 12281842
You cannot use DOUBLE QUOTE for literal string, try to change them to single quote:

DECLARE
TEMP_OBJECT CHAR(10);
BEGIN
  SELECT SIOBNM FROM SLTEST.F9860 into TEMP_OBJECT WHERE SIUPMJ = 104234;
  IF TEMP_OBJECT <> 0 THEN
     TEMP_OBJECT := 'F4211';
  ELSE
      TEMP_OBJECT := 'F4201';
  END IF;
COMMIT;
 
END;
0
 
LVL 5

Expert Comment

by:alexfrl
ID: 12517566
Line 4 is the line with a select station and DSACKER is right.
You should also consider the problem of double quote inspite of the fact that it is going to a subject of your next compilation.
0

Featured Post

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why doesn't the Oracle optimizer use my index? Querying too much data Most Oracle developers know that an index is useful when you can use it to restrict your result set to a small number of the total rows in a table. So, the obvious side…
Working with Network Access Control Lists in Oracle 11g (part 2) Part 1: http://www.e-e.com/A_8429.html Previously, I introduced the basics of network ACL's including how to create, delete and modify entries to allow and deny access.  For many…
This video shows setup options and the basic steps and syntax for duplicating (cloning) a database from one instance to another. Examples are given for duplicating to the same machine and to different machines
This video shows how to Export data from an Oracle database using the Original Export Utility.  The corresponding Import utility, which works the same way is referenced, but not demonstrated.

688 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question