Learn how to a build a cloud-first strategyRegister Now

x
?
Solved

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

Posted on 2004-10-11
3
Medium Priority
?
40,003 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 1000 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

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

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

Have you ever had to make fundamental changes to a table in Oracle, but haven't been able to get any downtime?  I'm talking things like: * Dropping columns * Shrinking allocated space * Removing chained blocks and restoring the PCTFREE * Re-or…
This post first appeared at Oracleinaction  (http://oracleinaction.com/undo-and-redo-in-oracle/)by Anju Garg (Myself). I  will demonstrate that undo for DML’s is stored both in undo tablespace and online redo logs. Then, we will analyze the reaso…
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…
Via a live example, show how to restore a database from backup after a simulated disk failure using RMAN.
Suggested Courses

810 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