Skip to Main Content
  • Questions
  • SP2-0734 when try to execute line begins with "#" character

Breadcrumb

more

Connor and Chris don't just spend all day on AskTOM. You can also catch regular content via Connor's blog and Chris's blog. Or if video is more your thing, check out Connor's latest video and Chris's latest video from their Youtube channels. And of course, keep up to date with AskTOM via the official twitter account.

Question and Answer

Connor McDonald

Thanks for the question, Carlos.

Asked: June 23, 2016 - 11:36 pm UTC

Answered by: Connor McDonald - Last updated: June 24, 2016 - 3:15 am UTC

Category: SQL*Plus - Version: 11.2.0.1.0

Viewed 1000+ times

Whilst you are here, check out some content from the AskTom team: Multiple partitions

You Asked

Hi,
I need to execute script (package body) that contents a line with first character "#", for example:
...
...
htp.p('
<script>
<style>
#tbTabs tr td table Port
...
...

When execute line "#tbTabs tr td table Port", this raises the error:
SP2-0734: unknown command beginning "tbTabs tr ..." - rest of line ignored.

Is there any configuration or command that I need to set to avoid this error?

Regards,
Carlos Agapito.

and we said...

"#" is the special character to allow running of SQLPlus commands, eg

SQL> select *
  2  #desc scott.emp
 Name                                                  Null?    Type
 ----------------------------------------------------- -------- ----------------------
 EMPNO                                                 NOT NULL NUMBER(4)
 ENAME                                                          VARCHAR2(10)
 JOB                                                            VARCHAR2(9)
 MGR                                                            NUMBER(4)
 HIREDATE                                                       DATE
 SAL                                                            NUMBER(7,2)
 COMM                                                           NUMBER(7,2)
 DEPTNO                                                         NUMBER(2)

  2  from scott.dept;

    DEPTNO DNAME          LOC
---------- -------------- -------------
        10 ACCOUNTING     NEW YORK
        20 RESEARCH       DALLAS
        30 SALES          CHICAGO
        40 OPERATIONS     BOSTON

4 rows selected.



Control it with "sqlprefix"

SQL> set sqlprefix ~
SQL> select *
  2  ~desc scott.emp
 Name                                                  Null?    Type
 ----------------------------------------------------- -------- -----------------
 EMPNO                                                 NOT NULL NUMBER(4)
 ENAME                                                          VARCHAR2(10)
 JOB                                                            VARCHAR2(9)
 MGR                                                            NUMBER(4)
 HIREDATE                                                       DATE
 SAL                                                            NUMBER(7,2)
 COMM                                                           NUMBER(7,2)
 DEPTNO                                                         NUMBER(2)



Is this answer out of date? If it is, please let us know via a Review