Skip to Main Content

SQL & PL/SQL

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

ORA-06550 Encountered the symbol when expecting one of the following

user12251389Aug 15 2017 — edited Aug 16 2017

I have inserted into my table using below query in sql developer :

Insert into test (ID,TEST_NAME,TEST_DB_NAME,TEST_TABLE_NAME,TEST_TYPE,TEST_STATEMENT,TEST_DT,TEST_VERSION_DT)

values

('LEONAME','BDW','PT','GRP_UPD','INSERT','UPDATE TEST_PROD_GRP sd

set DT = TO_DATE (''01.01.2000'', ''dd.mm.yyyy'')

where DT =

( select min(DT)

   from TEST_PROD_GRP sd2

   where sd.ID = sd2.ID  

   and NAME= ''AE''

);

',to_date('15-AUG-17 06.21.22','DD-MON-RR HH.MI.SS'),to_date('15-AUG-17 06.21.22','DD-MON-RR HH.MI.SS'))

Now when i try to execute this update statement which i have inserted into table i am getting error as

"ORA-06550: line 9, column 1:

PLS-00103: Encountered the symbol ";" when expecting one of the following:

   ( begin case declare end exception exit for goto if loop mod

   null pragma raise return select update while with

   <an identifier> <a double-quoted delimited-identifier>

   <a bind variable> << continue close current delete fetch lock

   insert open rollback savepoint set sql execute commit forall

   merge pipe purge

The symbol "exit" was substituted for ";" to continue."

When i view the update statement i can see the double quotes are applied bydefault which i believe seems to be causing the issue and i dont know how i can remove this in my insert statement:

"UPDATE TEST_PROD_GRP sd

set DT = TO_DATE ('01.01.2000', 'dd.mm.yyyy')

where DT =

( select min(DT)

   from TEST_PROD_GRP sd2

   where sd.ID= sd2.ID

   and NAME= 'AE'

);

"

This post has been answered by Solomon Yakobson on Aug 15 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 12 2017
Added on Aug 15 2017
2 comments
9,173 views