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!

ERROR at line 1: ORA-00911: invalid character

Quanwen ZhaoJul 16 2017 — edited Jul 25 2017

Hi,

I wrote a sql script file about 'check_current_date.sql',content as follows,

PROMPT -- Query value of current scn oracle physical standby database

PROMPT

COL current_scn FOR 9999999999999999

COL current_scn NEWVALUE c_scn NOPRINT

SELECT current_scn AS c_scn FROM v$database;

SELECT scn_to_timestamp(&c_scn) FROM DUAL;

and then i execute this sql script file in SQL*Plus, show error:

SYS@standby28>  @check_current_date

-- Query value of current scn oracle physical standby database

SP2-0158: unknown COLUMN option "NEWVALUE"

     C_SCN

----------

1.1746E+10

Enter value for c_scn: exit;

SELECT scn_to_timestamp(exit;) FROM DUAL

                            *

ERROR at line 1:

ORA-00911: invalid character

Please help me,thanks!

This post has been answered by Frank Kulash on Jul 16 2017
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 14 2017
Added on Jul 16 2017
7 comments
563 views