# PLSQL

**URL:** <https://community.unix.com/t/plsql/288178>\
**Category:** Programming\
**Created:** [May 17, 2011, 10:13am UTC](https://community.unix.com/t/plsql/288178 "2011-05-17T10:13:13Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Sanal](https://community.unix.com/letter_avatar/sanal/32/5_5575768a8748004e209b776fc1b2916d.png) [@Sanal](https://community.unix.com/u/Sanal)\
**Post date:** [May 17, 2011, 10:13am UTC](https://community.unix.com/t/plsql/288178/1 "2011-05-17T10:13:13Z")

</div>

HI,

When am creating one package body,its throwing error,  
Code which am using to create is:

```nohighlight
CREATE OR REPLACE PACKAGE BODY "MAMPROD"."PKG_QS_ADMIN" AS
-- ============================================================================
PROCEDURE CREATE_PARAMETERS
IS
BEGIN
  -- must log on as owner, aka: MAM PROD_ OR MAMP ROD_PHOTO!!!!
  -- must edit using NOTEPAD !!!
  -- ---------------------------------------------------
  -- ---------------------------------------------------
  BEGIN
        ctx_ddl.drop_preference ('QS_TEXT_STORAGE_'||UPPER(USER));
  EXCEPTION
        WHEN OTHERS THEN
                NULL;
  END;
  -- ---------------------------------------------------
  BEGIN
        ctx_ddl.create_preference ('QS_TEXT_STORAGE_'||UPPER(USER), 'BASIC_STORAGE');
        ctx_ddl.set_attribute ('QS_TEXT_STORAGE_'||UPPER(USER), 'I_TABLE_CLAUSE','tabl
espace '||UPPER(USER)||'_QS_INDEX_1 storage (initial 400M next 30m)');
        ctx_ddl.set_attribute ('QS_TEXT_STORAGE_'||UPPER(USER), 'K_TABLE_CLAUSE','tabl
espace '||UPPER(USER)||'_QS_INDEX_1 storage (initial 20M next 10m)');
        ctx_ddl.set_attribute ('QS_TEXT_STORAGE_'||UPPER(USER), 'R_TABLE_CLAUSE','tabl
espace '||UPPER(USER)||'_QS_INDEX_1 storage (initial 20M next 10m)');
        ctx_ddl.set_attribute ('QS_TEXT_STORAGE_'||UPPER(USER), 'N_TABLE_CLAUSE','tabl
espace '||UPPER(USER)||'_QS_INDEX_1 storage (initial 1M next 1m)');
        ctx_ddl.set_attribute ('QS_TEXT_STORAGE_'||UPPER(USER), 'I_INDEX_CLAUSE','tabl
espace '||UPPER(USER)||'_QS_INDEX_1 storage (initial 10M next 10m)');
  END;
  -- ---------------------------------------------------
  -- ---------------------------------------------------
  BEGIN
        ctx_ddl.drop_preference ('QS_TEXT_DATASTORE_'||UPPER(USER));
  EXCEPTION
        WHEN OTHERS THEN
                NULL;
  END;
  -- ---------------------------------------------------
  BEGIN
        ctx_ddl.create_preference ('QS_TEXT_DATASTORE_'||UPPER(USER), 'DETAIL_DATASTORE
');
        ctx_ddl.set_attribute ('QS_TEXT_DATASTORE_'||UPPER(USER), 'binary' , 'FALSE')
;
        ctx_ddl.set_attribute ('QS_TEXT_DATASTORE_'||UPPER(USER), 'detail_table' , UPP
ER(USER)||'.QS_TEXT_DTL');
        ctx_ddl.set_attribute ('QS_TEXT_DATASTORE_'||UPPER(USER), 'detail_key' , 'RECO
RD_ID');
        ctx_ddl.set_attribute ('QS_TEXT_DATASTORE_'||UPPER(USER), 'detail_lineno' , 'S
EQ_ID');
        ctx_ddl.set_attribute ('QS_TEXT_DATASTORE_'||UPPER(USER), 'detail_text' , 'TXT
');
  END;
  -- ---------------------------------------------------
  -- ---------------------------------------------------
  BEGIN
        ctx_ddl.drop_stoplist ('QS_TEXT_STOPLIST_'||UPPER(USER));
  EXCEPTION
        WHEN OTHERS THEN
                NULL;
  END;
  -- ---------------------------------------------------
  BEGIN
        ctx_ddl.create_stoplist ('QS_TEXT_STOPLIST_'||UPPER(USER), 'BASIC_STOPLIST');
  END;
  -- ---------------------------------------------------
  -- ---------------------------------------------------
  BEGIN
        ctx_ddl.drop_preference ('QS_TEXT_WORDLIST_'||UPPER(USER));
  EXCEPTION
        WHEN OTHERS THEN
                NULL;
  END;
  -- ---------------------------------------------------
  BEGIN
        ctx_ddl.create_preference ('QS_TEXT_WORDLIST_'||UPPER(USER) ,'BASIC_WORDLIST');
        ctx_ddl.set_attribute ('QS_TEXT_WORDLIST_'||UPPER(USER), 'WILDCARD_MAXTERMS'
, 15000);
  END;
  -- ---------------------------------------------------
  -- ---------------------------------------------------
END;
-- ============================================================================
PROCEDURE CREATE_INDEX
IS
BEGIN
        -- ---------------------------------------------------
        BEGIN
                EXECUTE IMMEDIATE 'DROP INDEX '||UPPER(USER)||'.QS_TEXT_MST_IXCON' ;
        EXCEPTION
                WHEN OTHERS THEN
                        NULL;
        END;
        -- ---------------------------------------------------
        EXECUTE IMMEDIATE 'CREATE INDEX '||UPPER(USER)||'.QS_TEXT_MST_IXCON'
                ||' ON '||UPPER(USER)||'.QS_TEXT_mst (UPD_FLG)'
                ||' INDEXTYPE IS CTXSYS.CONTEXT'
                ||' PARAMETERS'
                ||' ('''
                ||' STORAGE QS_TEXT_STORAGE_' ||UPPER(USER)
                ||' MEMORY 50m'
                ||' DATASTORE QS_TEXT_DATASTORE_' ||UPPER(USER)
                ||' STOPLIST QS_TEXT_STOPLIST_' ||UPPER(USER)
                ||' WORDLIST QS_TEXT_WORDLIST_' ||UPPER(USER)
                ||''')';
        -- ---------------------------------------------------
END;
-- ============================================================================
PROCEDURE ALTER_INDEX_REBUILD
IS
BEGIN
        -- ---------------------------------------------------
        EXECUTE IMMEDIATE 'ALTER INDEX '||UPPER(USER)||'.QS_TEXT_MST_IXCON REBUILD ONL
INE'
                ||' PARAMETERS'
                ||' ('''
                ||' REPLACE'
                ||' MEMORY 50m'
                ||''')';
        -- ---------------------------------------------------
        RETURN;
-- -- ---------------------------------------------------
-- EXECUTE IMMEDIATE 'ALTER INDEX '||UPPER(USER)||'.QS_TEXT_MST_IXCON REBUILD O
NLINE'
-- ||' PARAMETERS'
-- ||' ('''
-- ||' REPLACE'
-- ||' STORAGE QS_TEXT_STORAGE_' ||UPPER(USER)
-- ||' MEMORY 50m'
-- ||' DATASTORE QS_TEXT_DATASTORE_' ||UPPER(USER)
-- ||' STOPLIST QS_TEXT_STOPLIST_' ||UPPER(USER)
-- ||' WORDLIST QS_TEXT_WORDLIST_' ||UPPER(USER)
-- ||''')';
-- -- ---------------------------------------------------
END; 

```

And the ERROR is:-

```nohighlight
Warning: Package Body created with compilation errors.
 
LINE/COL ERROR
-------- -----------------------------------------------------------------
45/1 PLS-00103: Encountered the symbol "ER" when expecting one of the
following:
. ( ) , * @ % & | = - + < / > at in is mod remainder not
range rem => .. <an exponent (**)> <> or != or ~= >= <= <>
and or like LIKE2_ LIKE4_ LIKEC_ between || multiset member
SUBMULTISET_
The symbol "." was substituted for "ER" to continue.
124/6 PLS-00103: Encountered the symbol "
-- ||" when expecting one of the following:
:= . ( @ % ;
LINE/COL ERROR

```

-------- -----------------------------------------------------------------  
Please sugggest a solution

---

<div class="post-metadata">

**Author:** ![Ygor](https://community.unix.com/user_avatar/community.unix.com/ygor/32/104_2.png) [@Ygor](https://community.unix.com/u/Ygor)\
**Post date:** [May 17, 2011, 10:39am UTC](https://community.unix.com/t/plsql/288178/2 "2011-05-17T10:39:22Z")

</div>

Seems like the keyword UPPER has been split.  
The code has been mangled by word wrapping.

---

<div class="post-metadata">

**Author:** ![Ygor](https://community.unix.com/user_avatar/community.unix.com/ygor/32/104_2.png) [@Ygor](https://community.unix.com/u/Ygor)\
**Post date:** [May 19, 2011, 7:09am UTC](https://community.unix.com/t/plsql/288178/4 "2011-05-19T07:09:34Z")

</div>

If you just want to try Oracle, then you can use a prebuilt virtual machine.

[VirtualBox VMs for Developers](http://www.oracle.com/technetwork/community/developer-vm/index.html)
