Solved

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

Posted on 2004-10-11
3
39,956 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
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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

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‚Ķ
Checking the Alert Log in AWS RDS Oracle can be a pain through their user interface.  I made a script to download the Alert Log, look for errors, and email me the trace files.  In this article I'll describe what I did and share my script.
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video explains at a high level about the four available data types in Oracle and how dates can be manipulated by the user to get data into and out of the database.

773 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