Solved

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

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

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
PL/SQL Two changes 7 41
PL SQL Developer 7 73
Creation date for a PDB 5 63
Need SQL Query to Find Foreign-keys Without Indexed Columns 4 33
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…
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 video shows information on the Oracle Data Dictionary, starting with the Oracle documentation, explaining the different types of Data Dictionary views available by group and permissions as well as giving examples on how to retrieve data from th…
This video shows how to Export data from an Oracle database using the Datapump Export Utility.  The corresponding Datapump Import utility is also discussed and demonstrated.

733 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