SP2-0042: unknown command "end" - rest of line ignored.

Hi All, below is my code..
set timing on
begin
Delete PB_SURVEY_USER_IMA where Name != 'Login ID';
Delete PB_SURVEY_USER_IMA where value not like '%@%';
#Delete PB_SURVEY_USER_IMA where lower(value) like lower('%@pb.com');
Update PB_SURVEY_USER_IMA
Set Id = 10557,
CAN = (      Select Max( account_number)
          from pbaccount
          where member_id in (
               Select users_id
               from userreg
               where userreg.logonid = trim(PB_SURVEY_USER_IMA.value))
commit;
Update PB_SURVEY_USER_IMA Set country_id=(Select language_id from users where users_id in (Select users_id from userreg where userreg.logonid = trim(PB_SURVEY_USER_IMA.value)));
commit;
end;
exit;

Hi,
This forum is for problems using SQL*Developer and not general SQL or PL/SQL problems.
It would be better if you opened a new thread in the forum -
Forum: SQL and PL/SQL
PL/SQL
Regards,
Mike

Similar Messages

  • SP2-0042: unknown command "UNION" - rest of line ignored.

    I used sql script for creating DB structure on Oracle 8 with no errors.
    I got "SP2-0042: unknown command "UNION" - rest of line ignored" error on Oracle 9i.
    Do you anybody tell me whats wrong ?

    Sorry, I had technical problems to access this formu to response.
    My script (part):
    CREATE VIEW ARVALUE
    AS
    SELECT IDVALUE FROM DBVALUE;
    CREATE VIEW AWVALUE
    AS
    SELECT DBVALUE.IDVALUE FROM DBVALUE, AWOBJECT
    WHERE DBVALUE.IDOBJECT = AWOBJECT.IDOBJECT;
    CREATE VIEW BSOBJECTUSAGE
    AS
    SELECT IDOBJECT_CHILD AS IDOBJECT, IDOBJECT_PARENT AS REFERRER
    FROM OBJECTREF
    WHERE OBJECTREF.ACTIVE <> 0
    UNION
    SELECT IDOBJECT_TEMPLATE AS IDOBJECT, IDOBJECT AS REFERRER
    FROM DBVALUE
    WHERE (DBVALUE.ACTIVE <> 0) AND (STORAGETYPE = 2)
    UNION
    SELECT IDOBJECT_DIAGEXT AS IDOBJECT, IDOBJECT AS REFERRER
    FROM DBVALUE
    WHERE (DBVALUE.ACTIVE <> 0) AND (STORAGETYPE = 5);
    Log file (part)
    View created.
    View created.
    SP2-0042: unknown command "UNION" - rest of line ignored.
    SP2-0042: unknown command "UNION" - rest of line ignored.
    no rows selected
    View created.
    if I understand, better
    is:
    CREATE VIEW BSOBJECTUSAGE
    AS
    SELECT IDOBJECT_CHILD AS IDOBJECT, IDOBJECT_PARENT AS REFERRER
    FROM OBJECTREF
    WHERE OBJECTREF.ACTIVE <> 0
    UNION SELECT IDOBJECT_TEMPLATE AS IDOBJECT, IDOBJECT AS REFERRER
    FROM DBVALUE
    WHERE (DBVALUE.ACTIVE <> 0) AND (STORAGETYPE = 2)
    UNION SELECT IDOBJECT_DIAGEXT AS IDOBJECT, IDOBJECT AS REFERRER
    FROM DBVALUE
    WHERE (DBVALUE.ACTIVE <> 0) AND (STORAGETYPE = 5);

  • SP2-0042: unknown command " ■c" - rest of line ignored.

    On a 64bit install of oracle, i'm trying to run a script within sqlplus such as @c:/create.sql
    however when i run that, somehow it seems the @ sign as a ■ and screws up my script execution. Has anyone seen this before?

    This is my script that runs everywhere but 64bit:
    prompt *** DROP TABLES ***
    drop table STOCK;
    drop table LEDGER;
    prompt *** CREATE TABLES ***
    prompt LEDGER
    create table LEDGER
         ActionDate DATE,
         Action VARCHAR2(8),
         Item VARCHAR2(30),
         Quantity NUMBER,
         QuantityType VARCHAR2(10),
         Rate NUMBER,
         Amount NUMBER(9,2),
         Person VARCHAR2(25)
    prompt STOCK
    create table STOCK
         Company VARCHAR2(20),
         Symbol VARCHAR2(6),
         Industry VARCHAR2(15),
         CloseYesterday NUMBER(6,2),
         CloseToday NUMBER(6,2),
         Volume NUMBER
    and when i run it i get an error when it's trying to create the table. It seems as if it doesn't understand what i'm trying to tell it.

  • Strange SP2-0042: unknown command in sqlplus

    Hello everyone,i was attemptting to execute a sql statement from an external file. But i got "SP2-0042: unknown command "ï»? - rest of line ignored.". It's works with ANSI but can not based on UTF8 encoding.My file only contains as following :
    spo db_changesfff.log
    SPO OFF
    Anyone has ideas?thanks in advance!!

    We had this problem as well and we noticed that the script file that contained the UTF-8 had two FF FE magic numbers at the beginning of the file. View your file in HEX mode of your text editor and verify that a single FF FE is at the beginning of the file. We created our UTF-8 file using Notepad. This seems to put two FF FE's in the file header. When we removed one set of FF FE, everything worked just fine.

  • SP2-0042: unknow command "imp"

    I try to import file *.dmp using command
    imp system/manager file=unknow.dmp
    and there Oracle give me an error:
    SP2-0042: unknow command "imp" - rest of line ignored
    File was export in the same number of version Oracle!!
    What is wrong?? :(

    And I have the second question...
    Can we import file which was create or another OS version??
    For example:
    export is on Linux, and import is on Windows?? The Oracle version is the same.
    Thanks for help.

  • Unknown command ")" rest of line ignored

    Hi,
    Someone please let me know what the error in this DDL is:
    create table W_ASSET_D
    ROW_WID NUMERIC(10,0),
    AAG_NAME varchar2(150),
    AAG_SVC_TYPE varchar2(250),
    ACCOUNTING_MTHD varchar2(50),
    ACCOUNTING_MTHD_I varchar2(50),
    ANN_PERC_RATE NUMERIC(22,7),
    ANN_PERC_YIELD NUMERIC(22,7),
    ASSET_LOB varchar2(50),
    ASSET_LOB_I varchar2(50),
    ASSET_NUM varchar2(100),
    ASSET_TAG varchar2(50),
    ASSET_TYPE varchar2(50),
    ASSET_TYPE_I varchar2(50),
    BILL_STATUS_CD varchar2(50),
    BILL_STATUS_CD_I varchar2(50),
    BUILD_DT TIMESTAMP,
    BUILD_PLANT_CD varchar2(50),
    BUILD_PLANT_CD_I varchar2(50),
    CHANNEL_TYPE_CD varchar2(50),
    CHANNEL_TYPE_CD_I varchar2(50),
    COMMIT_AMT NUMERIC(22,7),
    COMPANY_CD varchar2(50),
    COMPANY_CD_I varchar2(50),
    COMPANY_CODE varchar2(50),
    COMPANY_CODE_I varchar2(50),
    CONDITION varchar2(50),
    CONDITION_I varchar2(50),
    COST_CATEGORY varchar2(50),
    COST_CATEGORY_I varchar2(50),
    CP_RISK_RATE varchar2(50),
    DEALER_RCPT_DT TIMESTAMP,
    DIVIDEND_OPTION varchar2(50),
    DIVIDEND_OPTION_I varchar2(50),
    DLR_INV_PRICE NUMERIC(22,7),
    DOORS_TYPE_CD varchar2(50),
    DOORS_TYPE_CD_I varchar2(50),
    DRIVE_TRAIN_CD varchar2(50),
    DRIVE_TRAIN_CD_I varchar2(50),
    END_DT TIMESTAMP,
    EXT_COLOR_CD varchar2(50),
    EXT_COLOR_CD_I varchar2(50),
    FIRST_SALE_DT TIMESTAMP,
    FLT_CAT_CD varchar2(50),
    FLT_CAT_CD_I varchar2(50),
    FLT_FLG varchar2(1),
    FLT_TYPE_CD varchar2(50),
    FLT_TYPE_CD_I varchar2(50),
    HLTH_ACCNT_TYPE varchar2(50),
    HLTH_ACCNT_TYPE_I varchar2(50),
    INCEPTION_DT TIMESTAMP,
    INSTALL_DT TIMESTAMP,
    INSURED_AMT NUMERIC(22,7),
    INTEREST_RATE NUMERIC(22,7),
    INT_COLOR_CD varchar2(50),
    INT_COLOR_CD_I varchar2(50),
    INVENTORY_LOC varchar2(100),
    LAST_STAT_DT TIMESTAMP,
    LCNS_EXP_DT TIMESTAMP,
    LICENSE_NO varchar2(50),
    LICENSE_STATE varchar2(50),
    MAKE_CD varchar2(50),
    MAKE_CD_I varchar2(50),
    MATURITY_DT TIMESTAMP,
    MINI_WID NUMERIC(10,0),
    MODEL_CD varchar2(50),
    MODEL_CD_I varchar2(50),
    MODEL_YR NUMERIC(10,0),
    MSRP_AMT NUMERIC(22,7),
    NEXT_STAT_DT TIMESTAMP,
    NON_FORFT_OPTION varchar2(50),
    NON_FORFT_OPTION_I varchar2(50),
    ODOMTR_RDG NUMERIC(22,7),
    ODOMTR_UOM varchar2(50),
    ODOMTR_UOM_I varchar2(50),
    ORIG_COST NUMERIC(22,7),
    OVERDRAFTS_YY NUMERIC(10,0),
    OWNER_NAME varchar2(50),
    PEND_CANCEL_FLG varchar2(1),
    PREMIUM NUMERIC(22,7),
    PREMIUM_CLASS varchar2(50),
    PREMIUM_DT TIMESTAMP,
    PRODUCT_NAME varchar2(100),
    PROFIT NUMERIC(22,7),
    PURCHASE_DT TIMESTAMP,
    QTY NUMERIC(22,7),
    RATE_PLAN varchar2(50),
    RATE_PLAN_I varchar2(50),
    RATE_STATE varchar2(15),
    REFERRAL_NAME varchar2(100),
    REGISTERED_DT TIMESTAMP,
    REVENUE NUMERIC(22,7),
    REV_NUM varchar2(50),
    SERIAL_NUM varchar2(100),
    SHIP_DT TIMESTAMP,
    START_DT TIMESTAMP,
    STATUS varchar2(50),
    STATUS_I varchar2(50),
    SUB_STATUS varchar2(50),
    SUB_STATUS_I varchar2(50),
    SUB_TYPE varchar2(50),
    SUB_TYPE_I varchar2(50),
    TRANSMISSION_CD varchar2(50),
    TRANSMISSION_CD_I varchar2(50),
    TRIM_CD varchar2(50),
    TRIM_CD_I varchar2(50),
    U_CURCY_CD varchar2(50),
    U_EXCH_DT TIMESTAMP,
    U_MSRP_AMT NUMERIC(22,7),
    U_MSRP_CURCY_CD varchar2(50),
    U_MSRP_EXCH_DT TIMESTAMP,
    U_ORIG_CST NUMERIC(22,7),
    U_VALUE_AMT NUMERIC(22,7),
    VALUE_AMT NUMERIC(22,7),
    VALUE_BASIS varchar2(50),
    VALUE_BASIS_I varchar2(50),
    VERSION varchar2(50),
    VHCL_TYPE_CD varchar2(50),
    VHCL_TYPE_CD_I varchar2(50),
    VIN_NUM varchar2(100),
    VIS_PR_BU_ID varchar2(30),
    VIS_PR_EMP_ID varchar2(30),
    VIS_PR_POS_ID varchar2(30),
    VIS_PR_POSTN_DH_WID NUMERIC(10,0),
    WRNTY_END_DT TIMESTAMP,
    WRNTY_NAME varchar2(100),
    WRNTY_START_DT TIMESTAMP,
    WRNTY_SUB_TYPE varchar2(50),
    WRNTY_SUB_TYPE_I varchar2(50),
    WRNTY_TYPE varchar2(50),
    WRNTY_TYPE_I varchar2(50),
    CREATED_BY_WID NUMERIC(10,0),
    CHANGED_BY_WID NUMERIC(10,0),
    CREATED_ON_DT TIMESTAMP,
    CHANGED_ON_DT TIMESTAMP,
    AUX1_CHANGED_ON_DT TIMESTAMP,
    AUX2_CHANGED_ON_DT TIMESTAMP,
    AUX3_CHANGED_ON_DT TIMESTAMP,
    AUX4_CHANGED_ON_DT TIMESTAMP,
    SRC_EFF_FROM_DT TIMESTAMP,
    SRC_EFF_TO_DT TIMESTAMP,
    EFFECTIVE_FROM_DT TIMESTAMP,
    EFFECTIVE_TO_DT TIMESTAMP,
    DELETE_FLG varchar2(1),
    CURRENT_FLG varchar2(1),
    W_INSERT_DT TIMESTAMP,
    W_UPDATE_DT TIMESTAMP,
    DATASOURCE_NUM_ID NUMERIC(10,0),
    ETL_PROC_WID NUMERIC(10,0),
    INTEGRATION_ID varchar2(80),
    TENANT_ID varchar2(80),
    X_CUSTOM varchar2(10)
    );

    Script:
    create table W_ASSET_D
    ROW_WID NUMERIC(10,0)
    /Execution:
    SQL> create table W_ASSET_D
      2  (
      3  ROW_WID NUMERIC(10,0)
      4 
    SQL> )
    SP2-0042: unknown command ")" - rest of line ignored.
    SQL> /
    ROW_WID NUMERIC(10,0)
    ERROR at line 3:
    ORA-00907: missing right parenthesis
    SQL> Hint:
    SQL> SET SQLBLANKLINES ON
    SQL> create table W_ASSET_D
      2  (
      3  ROW_WID NUMERIC(10,0)
      4 
      5  )
      6  /
    Table created.
    SQL> SY.

  • Unknown command beginning "recover da..." - rest of line ignored

    Hi.
    I have one corrupted datafile (status column from v$datafile have value 'RECOVER' for it and I get ORA-01113, ORA-01110 when I try to get it online). It seems I need manually recover datafile via 'RECOVER DATAFILE' command. However when I issue it in SQL*Plus I get: 'unknown command beginning "recover da..." - rest of line ignored.'.
    I have Oracle 8.0.5 Database.
    Thx

    Is this production server If yes 'DON'T touch and get away from that key board' in tom words.
    and take a oracle support if you are not familer with recover command.
    In case its your testing enviornment the you can take the corrupt datafile offline restore the new from latest backup and for this you should have all archive log from the date of last backup.
    after restoring datafile use recover command.
    http://www.iselfschooling.com/mc4articles/mc4recovery.htm
    go through following link for step by step recovery.

  • Sql select with concate of columns SP2-0734: unknown command beginning

    I am running a ksh script that does some dumpster diving and pull records out.
    It is basically reading a file does a select and at the end, you will see $i.
    AND ORD_ORDER.ADV_ORDER_TEXT_FIELD_568='$';
    I can run the script manually. (without the while loop)
    But, when I run it thru the script I get a whack of errors.
    SP2-0734: unknown command beginning "FROM ADVXR..." - rest of line ignored.
    SP2-0734: unknown command beginning "ADVXRT_HDB..." - rest of line ignored.
    SP2-0734: unknown command beginning "ADVXRT_HDB..." - rest of line ignored.
    SP2-0734: unknown command beginning "ADVXRT_HDB..." - rest of line ignored.
    SP2-0044: For a list of known commands enter HELP
    and to leave enter EXIT.
    What I need it to do is pull the selected records out and place in a file.
    Script
    cat $TICKETS_MISMATCH |while read i
    do
    $SQLPLUS -silent "advxrt_hdb/$LOGONID@hdb" <<EOF >$TICKETS_MISMATCH_FULL
    set feedback off
    set verify off
    set echo off
    set heading off
    set pagesize 7010
    SELECT ORD_ORDER.ADV_ORDER_TEXT_FIELD_568
    || ','
    || ORD_ORDER.ORDER_NUM
    || ','
    || ORD_ORDER.ADV_ORDER_SUMMARY_FIELD_012
    || ','
    || LAB_USER.NAME
    || ','
    || LAB_USER.LOGON_ID
    || ','
    || LAB_USER.ADV_EXTENDED_USER_FIELD_001
    || ','
    || TO_CHAR(MOBILECOMP1_SR.ADV_COMPLETION_TIME_FIELD_001, 'HH24:MI:SS')
    || ','
    || TO_CHAR(MOBILECOMP1_SR.ADV_COMPLETION_DATE_FIELD_001, 'DD-MON-YYYY')
    || ','
    || MOBILECOMP1_SR.ADV_COMPLETION_NOTES_FIELD_001
    || ','
    || MOBILECOMP1_SR.ADV_COMPLETION_TEXT_FIELD_003
    || ','
    || MOBILECOMP1_SR.ADV_COMPLETION_TEXT_FIELD_013
    || ','
    || MOBILECOMP1_SR.ADV_COMPLETION_TEXT_FIELD_014
    || ','
    || MOBILECOMP1_SR.ADV_COMPLETION_TEXT_FIELD_023
    || ','
    || ORD_JOB_CODE.NAME
    || ','
    || ROUND(ASN_ASSIGNMENT.TOTAL_TIME_EN_ROUTE / 60,0)
    || ','
    || ROUND(ASN_ASSIGNMENT.TOTAL_TIME_ON_SITE / 60,0)
    FROM ADVXRT_HDB.LAB_USER,
    ADVXRT_HDB.SR_REPORT,
    ADVXRT_HDB.ASN_ASSIGNMENT,
    ADVXRT_HDB.ORD_ORDER,
    ADVXRT_HDB.MOBILECOMP1_SR,
    ADVXRT_HDB.ORD_JOB_CODE
    WHERE (ASN_ASSIGNMENT.ASSIGNMENT_ID = SR_REPORT.ASSIGNMENT)
    AND (ASN_ASSIGNMENT.FOR_ORDER = ORD_ORDER.ORDER_ID)
    AND (MOBILECOMP1_SR.MOBILE_COMP1_ID = SR_REPORT.RECORD_NUMBER)
    AND (ORD_ORDER.JOB_CODE = ORD_JOB_CODE.JOB_CODE_ID)
    AND (SR_REPORT.USER_ID = LAB_USER.USER_ID(+))
    AND ORD_ORDER.COMPLETED BETWEEN ((TO_DATE('${date_entered} 00:00:00','YYYY-MM-DD HH24:MI:SS')) - ((SELECT DECODE
    (UTC_OFFSET, NULL, 0, UTC_OFFSET) FROM TZ_UTC_TO_LOCAL TZ WHERE (TO_DATE
    ('${date_entered} 00:00:00','YYYY-MM-DD HH24:MI:SS') BETWEEN TZ.STARTS_UTC AND
    TZ.ENDS_UTC)AND TZ.TIME_AUTHORITY = 1000264000000000000000000013))/(24*60*60))
    AND
    ((TO_DATE('${date_entered} 11:59:59','YYYY-MM-DD HH24:MI:SS')) - ((SELECT DECODE
    (UTC_OFFSET, NULL, 0, UTC_OFFSET) FROM TZ_UTC_TO_LOCAL TZ WHERE (TO_DATE
    ('${date_entered} 11:59:59','YYYY-MM-DD HH24:MI:SS') BETWEEN TZ.STARTS_UTC AND
    TZ.ENDS_UTC)AND TZ.TIME_AUTHORITY = 1000264000000000000000000013))/(24*60*60))
    AND ORD_ORDER.ADV_ORDER_TEXT_FIELD_568='${i}';
    exit;
    EOF
    done

    SQL> DEFINE sqlplusrelease
    DEFINE SQLPLUSRELEASE = "1002000200" (CHAR)
    cat $TICKETS_MISMATCH |while read i
    do
    $SQLPLUS -silent "advxrt_hdb/$LOGONID@hdb" <<EOF >>$TICKETS_MISMATCH_FULL
    set feedback off
    set verify off
    set echo off
    set heading off
    set pagesize 7010
    SET SQLBLANKLINES ON
    SELECT  ORD_ORDER.ADV_ORDER_TEXT_FIELD_568
        || ','
        || ORD_ORDER.ORDER_NUM
        || ','
        || ORD_ORDER.ADV_ORDER_SUMMARY_FIELD_012
        || ','
        || LAB_USER.NAME
        || ','
        || LAB_USER.LOGON_ID
        || ','
        || LAB_USER.ADV_EXTENDED_USER_FIELD_001
        || ','
        || TO_CHAR(MOBILECOMP1_SR.ADV_COMPLETION_TIME_FIELD_001, 'HH24:MI:SS')
        || ','
        || TO_CHAR(MOBILECOMP1_SR.ADV_COMPLETION_DATE_FIELD_001, 'DD-MON-YYYY')
        || ','
        || MOBILECOMP1_SR.ADV_COMPLETION_NOTES_FIELD_001
        || ','
        || MOBILECOMP1_SR.ADV_COMPLETION_TEXT_FIELD_003
        || ','
        || MOBILECOMP1_SR.ADV_COMPLETION_TEXT_FIELD_013
        || ','
        || MOBILECOMP1_SR.ADV_COMPLETION_TEXT_FIELD_014
        || ','
        || MOBILECOMP1_SR.ADV_COMPLETION_TEXT_FIELD_023
        || ','
        || ORD_JOB_CODE.NAME
        || ','
        || ROUND(ASN_ASSIGNMENT.TOTAL_TIME_EN_ROUTE / 60,0)
        || ','
        || ROUND(ASN_ASSIGNMENT.TOTAL_TIME_ON_SITE / 60,0)
    FROM ADVXRT_HDB.LAB_USER,
           ADVXRT_HDB.SR_REPORT,
           ADVXRT_HDB.ASN_ASSIGNMENT,
           ADVXRT_HDB.ORD_ORDER,
           ADVXRT_HDB.MOBILECOMP1_SR,
           ADVXRT_HDB.ORD_JOB_CODE
    WHERE     (ASN_ASSIGNMENT.ASSIGNMENT_ID = SR_REPORT.ASSIGNMENT)
           AND (ASN_ASSIGNMENT.FOR_ORDER = ORD_ORDER.ORDER_ID)
           AND (MOBILECOMP1_SR.MOBILE_COMP1_ID = SR_REPORT.RECORD_NUMBER)
           AND (ORD_ORDER.JOB_CODE = ORD_JOB_CODE.JOB_CODE_ID)
           AND (SR_REPORT.USER_ID = LAB_USER.USER_ID(+))
           AND ORD_ORDER.COMPLETED BETWEEN ((TO_DATE('${date_entered} 00:00:00','YYYY-MM-DD HH24:MI:SS')) - ((SELECT DECODE
                (UTC_OFFSET, NULL, 0, UTC_OFFSET) FROM TZ_UTC_TO_LOCAL TZ WHERE (TO_DATE
                ('${date_entered} 00:00:00','YYYY-MM-DD HH24:MI:SS') BETWEEN TZ.STARTS_UTC AND
                TZ.ENDS_UTC)AND TZ.TIME_AUTHORITY = 1000264000000000000000000013))/(24*60*60))
           AND
                ((TO_DATE('${date_entered} 11:59:59','YYYY-MM-DD HH24:MI:SS')) - ((SELECT DECODE
                (UTC_OFFSET, NULL, 0, UTC_OFFSET) FROM TZ_UTC_TO_LOCAL TZ WHERE (TO_DATE
                ('${date_entered} 11:59:59','YYYY-MM-DD HH24:MI:SS') BETWEEN TZ.STARTS_UTC AND
                TZ.ENDS_UTC)AND TZ.TIME_AUTHORITY = 1000264000000000000000000013))/(24*60*60))
            AND ORD_ORDER.ADV_ORDER_TEXT_FIELD_568='${i}';
    exit
    EOF
    done

  • "SP2-0734: unknown command..." error while importing a dump file

    hello,
    i want to import a dump file into my database named orcl, and i come accross the same error after executing the import command. my import command is:
    SQL> imp mvdemo/mvdemo file=mvdemo.dmp full=y ignore=y
    i use oracle 10g enterprise edition.
    i created the user mvdemo/mvdemo.
    the error i see in my screen is:
    SP2-0734: unknown command beginning "imp mvde..." - rest of line ignored.
    for a long period of time, i havent used oracle dbms. before, i remember that i used enterprise manager in import/export processes. however, i am not able to find the enterprise manager in 10g options now. do i have to install the enterprise manager seperately in oracle 10g enterprise edition? may this problem be relational with this matter?
    if someone could answer, i would be greatful.
    best regards

    Import is run from the command prompt, not the SQL prompt.

  • Error SP2-0042. PLEASE HELP!!!

    I am trying to run a .sql file from SQL*Plus. I typed "start c:\test.sql" at the command prompt and am getting "SP2-0042: unknown command "~S" - rest of line ignored". Can anyone tell me why am I getting this and how to fix it.
    Thanks in advance for your time and input.
    L.S.

    Thanks, Inaam.
    I discovered this morning that the file was using 'unicode text document'. once I changed it to 'text document' it ran successfully.
    Larry

  • SP2-0042 when copy paste the *

    Hi,
    Did you notice this annoying enhancement in 10g : you cannot copy-paste the listing of the current line because of the star marking the current line.
    SQL> l
      1  select
      2  *
      3  from
      4* dualif you want to copy-paste the code above in your sqlplus session, it was working in 7,8,9. But no longer in 10!
    SQL>   1  select
    SQL>   2  *
    SQL>   3  from
    SQL>   4* dual
    SP2-0042: unknown command "4* dual" - rest of line ignored.Regards
    Laurent

    Bump

  • Unknown command beginning  "NODUPLICATES..."

    Hello,
    When I execute this sql script, I get the error below. I'm on Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit. It runs and gives formatted output. Do you have any suggestions as to why I get this error?
    set pagesize 100
    set linesize 100
    column c0 format a10 heading 'Owner Name'
    column c1 format a20 heading 'Table Name'
    column c2 format a20 heading 'Index Name'
    column c3 format a20 heading 'Column Name'
    column c4 format a10 heading 'Uniqueness'
    break on c0 skip1 NODUPLICATES on c1 skip1 NODUPLICATES on c2 skip1
    NODUPLICATES on c4 NODUPLICATES
    select     ...
    unknown command beginning "NODUPLICAT..." - rest of line ignored.
    Edited by: Cerito on May 31, 2013 8:26 AM

    Hi,
    Cerito wrote:
    Hello,
    When I execute this sql script, I get the error below. I'm on Oracle Database 10g Enterprise Edition Release 10.2.0.5.0 - 64bit. It runs and gives formatted output. Do you have any suggestions as to why I get this error?
    set pagesize 100
    set linesize 100
    column c0 format a10 heading 'Owner Name'
    column c1 format a20 heading 'Table Name'
    column c2 format a20 heading 'Index Name'
    column c3 format a20 heading 'Column Name'
    column c4 format a10 heading 'Uniqueness'
    break on c0 skip1 NODUPLICATES on c1 skip1 NODUPLICATES on c2 skip1It looks like the line below is supposed to be a continuation of the line above.
    NODUPLICATES on c4 NODUPLICATESIf you can't put the entire command on one line, then put a single hyphen ( - ) at the end of the first line, to tell SQL*Plus that the command is continued on the line below, like this:
    break on c0 skip1 NODUPLICATES on c1 skip1 NODUPLICATES on c2 skip1  -
           NODUPLICATES on c4 NODUPLICATES
    select     ...
    unknown command beginning "NODUPLICAT..." - rest of line ignored.
    Edited by: Cerito on May 31, 2013 8:26 AMIn SQL (and also in SQL*Plus) commands are delimited by ; and or /, and a newline is just whitespace. SQL*Plus is a different langauge, with different syntax. In SQL*Plus, newline marks the end of a command, unless you put a hyphen at the end of the line before it.
    Edited by: Frank Kulash on May 31, 2013 11:34 AM
    Edited by: Frank Kulash on May 31, 2013 11:52 AM
    By the way, NODUPLICATES is the default. You might consider just saying
    break on c0 skip1  on c1 skip1  on c2 skip1   on c4so the entire BREAK command fits easily onto 1 line. On the other hand, it's often nice to make the command very clear, even if that means making it longer. In that case, you might want something like:
    BREAK  ON c0  SKIP 1  NODUPLICATES   -
           ON c1  SKIP 1  NODUPLICATES   -
           ON c2  SKIP 1  NODUPLICATES   -
           ON c4             NODUPLICATES

  • Unknown command beginning "shutdown i

    Hi dbaguru,
    Can any one provide me solution. i unable to shutdown my dabase it showing below message when i make my database into downmode.
    SQL*Plus: Release 8.0.6.0.0 - Production on Tue Aug 19 14:19:58 2008
    (c) Copyright 1999 Oracle Corporation. All rights reserved.
    Enter user-name: sys as sysdba
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.7.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.7.0 - Production
    unknown SET option beginning "SQLPLUSCOM..."
    SQL> shutdown immediate
    unknown command beginning "shutdown i..." - rest of line ignored.

    It looks like you are using Sqlplus from Oracle 8 to shutdown an Oracle 9 database.
    I think you should logout and check your environment to make sure you are using the correct sqlplus to connect to the correct database.

  • EXEC DBMS_AQADM.GRANT_SYSTEM_PRIVILEGE -- Unknown Command ??

    Hi,
    I am trying to create queues as explained here
    http://www.akadia.com/services/ora_advanced_queueing.html
    but I am running into this problem.
    Any ideas how to solve it?
    Thanks!!
    EXEC DBMS_AQADM.GRANT_SYSTEM_PRIVILEGE(
    privilege => 'ENQUEUE_ANY',
    grantee => 'my_aq_user_role',
    admin_option => FALSE
    Error starting at line 1 in command:
    EXEC DBMS_AQADM.GRANT_SYSTEM_PRIVILEGE(
    Error report:
    ORA-06550: rad 1, kolumn 41:
    PLS-00103: Påträffade symbolen ";" då en av följande förväntades:
    + case mod new not null <an identifier>
    <a double-quoted delimited-identifier> <a bind variable>
    table continue avg count current exists max min prior sql
    stddev sum variance execute multiset the both leading
    trailing forall merge year month day hour minute second
    timezone_hour timezone_minute timezone_region timezone_abbr
    time timestamp interval date
    <a string literal with character set specification>
    <a nu
    06550. 00000 - "line %s, column %s:\n%s"
    *Cause:    Usually a PL/SQL compilation error.
    *Action:
    Error starting at line 2 in command:
    privilege => 'ENQUEUE_ANY',
    Error report:
    Unknown Command
    Error starting at line 3 in command:
    grantee => 'my_aq_user_role',
    Error report:
    Unknown Command
    Error starting at line 4 in command:
    admin_option => FALSE
    Error report:
    Unknown Command
    Error starting at line 5 in command:
    Error report:
    Unknown Command

    Look at this example.
    SQL> ed
    Wrote file afiedt.buf
      1  begin
      2  DBMS_AQADM.GRANT_SYSTEM_PRIVILEGE(
      3  privilege => 'ENQUEUE_ANY',
      4  grantee => 'HR',
      5  admin_option => FALSE
      6  );
      7* end;
    SQL> /
    PL/SQL procedure successfully completed.
    SQL> EXEC DBMS_AQADM.GRANT_SYSTEM_PRIVILEGE('ENQUEUE_ANY','HR',FALSE);
    PL/SQL procedure successfully completed.
    SQL> exec DBMS_AQADM.GRANT_SYSTEM_PRIVILEGE(privilege => 'ENQUEUE_ANY',grantee => 'HR',admin_option => FALSE);
    PL/SQL procedure successfully completed.
    SQL> EXEC DBMS_AQADM.GRANT_SYSTEM_PRIVILEGE(
    BEGIN DBMS_AQADM.GRANT_SYSTEM_PRIVILEGE(; END;
    ERROR at line 1:
    ORA-06550: line 1, column 41:
    PLS-00103: Encountered the symbol ";" when expecting one of the following:The problem is when you copied the example, you copied with "enter" character.

  • IMPDP / EXPDP unknown command

    Hi,
    I don't use oracle databases for a long time and I am not a DBA. Now I am using it again with the following environment: there is a server with a huge database Oracle 10g EE and I am developing an application that uses a part of this. I have Oracle 10g XE on my development machine and I want to use expdp/impdp to copy the tables I am interested in into my machine.
    My problem is that I get a SP2-0042 error telling me that the command is unknown (in both server and dev machine). From what I understood the datapump should be available in both versions. Does anyone can help me?
    Thank you,
    Rui

    Expdp/impdp are separate utilities and not subcommands in sqlplus. I recommend you read the documentation.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14215/part_dp.htm#i436481
    Werner

Maybe you are looking for

  • Importing and executing a .sql file into  Oracle 10g

    Hi I am looking to import and execute a .sql file(create scripts created of a databse designed in MS SQL Server 2005). The file was imported into Oracle APEX 3.10 but we are unable to execute the script. Please suggest alternatives as to how we can i

  • MacBook Air No Longer Sees Remote External Drive

    I have an iMac with a FW800 connected external hard drive. I use it for Time Machine backups. Also use an Airport Extreme for wireless connection. My MacBook Air at one time was able to "see" that external drive via the Airport and I used it to backu

  • DBMS_OUTPUT -- please help!

    Hi, i'm posting this message because i'm desparate enough to do so and it is my last resort before i give up. Any suggestions are very much appreciated. b.t.w. i have read T.F.M. I'm trying to display a couple of lines using the DBMS_OUTPUT.PUT_LINE

  • Error when installing Lenovo solutions for small business [Screenie included]

    Hello everyone. Recently, I tried opening the pre-installed Lenovo solutions for Small Business software on my Lenovo e530 running Windows 7 Professional 64-bit version (Upgraded from Win 7 Home Prem 64-bit) but failed after getting a message for enc

  • How to hide the Group Tree in WPF viewer

    I am trying to hide the GroupTree when I run a report, I would like to be able to turn this feature on for a few reports, however; I will normally like to hide the groups. Your help will be highly appreciated