Solved

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

Posted on 2004-10-11
3
39,950 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
Comment Utility
Look closer.

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

Expert Comment

by:seazodiac
Comment Utility
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
Comment Utility
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.

Join & Write a Comment

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Note: this article covers simple compression. Oracle introduced in version 11g release 2 a new feature called Advanced Compression which is not covered here. General principle of Oracle compression Oracle compression is a way of reducing the d…
This video shows, step by step, how to configure Oracle Heterogeneous Services via the Generic Gateway Agent in order to make a connection from an Oracle session and access a remote SQL Server database table.
This video shows syntax for various backup options while discussing how the different basic backup types work.  It explains how to take full backups, incremental level 0 backups, incremental level 1 backups in both differential and cumulative mode a…

772 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

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now