XML request error. ORA-00933: SQL not correctly completed command.

Hi all

My Version of the database: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0.

CREATE table test (name VARCHAR2 (3), identification number);

Insert test values ('abc', 61);

Insert test values ('def', 46);

Select table_name,
column_name,
search_string 'abc ',.
result
CLO, xmltable (('ora: view("'||))) table_name |' ") / RANK /' | column_name | "[ora:contains (text,' %'|)] "abc". "% ») > 0]')
result varchar2 columns (10) path '.'
)
where table_name in ('TEST');

and I get: ORA-00933: SQL not correctly completed command it points on ' * xmltable *'
SQL> SELECT extractValue(value(t), '/CustomerInformation/Customerid') "Customerid"
  2       , extractValue(value(t), '/CustomerInformation/CustomerName') "CustomerName"
  3       , extractValue(value(t), '/CustomerInformation/Country') "Country"
  4  FROM xml_document_table x
  5     , TABLE(
  6         XMLSequence(
  7           extract(x.xml_document, '/Customer/CustomerInformation')
  8         )
  9       ) t
 10  ;

Customerid            CustomerName             Country
--------------------- ------------------------ -------------
1                     xxxx                     4
2                     yyyy                     5
 

Tags: Database

Similar Questions

  • Error: ORA-00933: SQL not correctly completed command

    Hello

    When I run the query of delimit (who used to write the result of refsursor) in sql * plus, it works well.
    OPEN result FOR
         SELECT site_direction_id direction_numbers,
               site_lane_id lane_numbers
          FROM site_lanes
             JOIN report_parameters 
               ON site_lane_id = report_parameter_value
            WHERE site_lanes.site_id = my_site_id
              AND report_parameters.report_parameter_id  = in_report_parameter_id
              AND report_parameters.report_parameter_group = 'LANE'
           AND report_parameters.report_parameter_name  = 'LANE'
      ORDER BY site_direction_id ASC,
               site_lane_id ASC
          FROM SYS.DUAL;
    But inside a procedure, when compiling, throwing me the following error message. I'm not sure why it generates this error.
     ----------------------------------------------------
     PL/SQL: SQL Statement ignored
     PL/SQL: ORA-00933: SQL command not properly ended
    Could someone help me?

    Thank you.

    Published by: user10641405 on June 8, 2009 11:39

    Hello

    It really works in SQL * more? He has two FROM clauses.

    You probably want to remove 'OF SYS. DOUBLE"of the last line.

  • ORA-00933: SQL not correctly completed command.

    Hello

    I get the following error:-ORA-00933: SQL not correctly completed command

    select
                (select max(x.exec_id) from log_exec x) exec_id,
                'c2uv_sys_map' table_name, 'All' upload_file_name,
                count(*) rows_ok, 0 rows_duplicate, 0 rows_rejected, 0 rows_bad, e.upload_file_id
                from c2uv_sys_map e
                where e.row_err_id=0
                group by e.upload_file_id
                UNION
                select max(x.exec_id) from log_exec x) exec_id,
                'c2uv_sys_map' table_name, 'All' upload_file_name,
                count(*) rows_ok, 0 rows_duplicate, 0 rows_rejected, 0 rows_bad, e.upload_file_id
                from c2uv_sys_map e
                group by e.upload_file_id
                UNION
                select (select max(x.exec_id) from log_exec x) exec_id,
                'c2uv_sys_map' table_name, 'All' upload_file_name,
                0 rows_ok, count(*) rows_duplicate, 0 rows_rejected, 0 rows_bad, e.upload_file_id
                from c2uv_sys_map  e
                where e.row_err_id=2
                group by e.upload_file_id
                UNION
                select (select max(x.exec_id) from log_exec x) exec_id,
                'c2uv_sys_map' table_name, 'All' upload_file_name,
                0 rows_ok, 0 rows_duplicate, count(*) rows_rejected, 0 rows_bad, e.upload_file_id
                from c2uv_sys_map  e
                where (e.row_err_id =1) or (e.row_err_id >2)
                group by e.upload_file_id
                UNION
                select (select max(x.exec_id) from log_exec x) exec_id,
                'c2uv_sys_map' table_name, 'All' upload_file_name,
                0 rows_ok, 0 rows_duplicate, 0 rows_rejected, u.no_of_bad_rows rows_bad, t.upload_file_id
                from c2uv_sys_map t right outer join chn_upload u on t.upload_file_id = u.config_id
                inner join chn_upload_config c on u.config_id = c.config_id
                inner join chc_data_filetype f on c.data_filetype_id = f.data_filetype_id
                where f.data_filetype_id = 11
                group by u.no_of_bad_rows, t.upload_file_id
    Edited by: 872435 January 6, 2012 06:09

    It seems that this parenthesis corresponds to nothing:

    select (select max(x.exec_id) from log_exec x) exec_id,
           'c2uv_sys_map' table_name,
           'All' upload_file_name,
           count(*) rows_ok,
           0 rows_duplicate,
           0 rows_rejected,
           0 rows_bad,
           e.upload_file_id
      from c2uv_sys_map e
     where e.row_err_id = 0
     group by e.upload_file_id
    UNION
    select max(x.exec_id)
      from log_exec x)         -- <-- Here
    ...
    
  • ORA-00933: SQL not correctly completed command (similar question titles exist - can not find my question).

    Hi all

    I have a couple of (relatively simple) tables (see DDL and DML below and try to join them,)

    but I get the error ORA-00933 - and I can't for the life of understand me why?

    I also put this on SQLFiddle for those who do not have a very convenient server.

    This is the SELECT query - internal works without problem, but I can't

    all for work.

    Any help appreciated - TIA and rgs,

    Paul...

    [code]

    CREATE TABLE ticket

    (

    ticket_id INT PRIMARY KEY,

    ticket_description VARCHAR (25)

    );

    INSERT INTO ticket VALUES (1, 'ticket 1');

    INSERT INTO ticket VALUES (2, 'ticket 2');

    INSERT INTO ticket VALUES (3, ' ticket 3 ");

    INSERT INTO ticket VALUES (4, 'ticket 4');

    INSERT INTO ticket VALUES (5, 'ticket 5');

    CREATE TABLE my_comment

    (

    comment_id INT PRIMARY KEY,

    ticket_id INT NOT NULL,

    comments_comment VARCHAR (45) NOT NULL,

    comments_timestamp INT NOT NULL

    );

    INSERT INTO my_comment VALUES (1, 1, 'comment 1 ticket to 1', ((TO_DATE ('2013-11-30 15:15:30 ', ' yyyy-mm-jj HH24:mi:ss)-TO_DATE ('1970-01-01 00:00:00 ',' yyyy-mm-dd HH24:mi:ss)) * 86400));))

    INSERT INTO my_comment VALUES (2, 1, 'Comment 2 1 notes', ((TO_DATE ('2014-02-13 15:15:30 ', ' yyyy-mm-jj HH24:mi:ss)-TO_DATE ('1970-01-01 00:00:00 ',' yyyy-mm-dd HH24:mi:ss)) * 86400));))

    INSERT INTO my_comment VALUES (3, 1, ' comment 3 tickets on 1', ((TO_DATE ('2014-06-30 15:15:30 ', ' yyyy-mm-jj HH24:mi:ss)-TO_DATE ('1970-01-01 00:00:00 ',' yyyy-mm-dd HH24:mi:ss)) * 86400));))

    INSERT INTO my_comment VALUES (4, 1, ' comment 4 tickets on 1', ((TO_DATE ('2014-07-09 15:15:30 ', ' yyyy-mm-jj HH24:mi:ss)-TO_DATE ('1970-01-01 00:00:00 ',' yyyy-mm-dd HH24:mi:ss)) * 86400));))

    INSERT INTO my_comment VALUES (5, 2, 'comment 1 ticket in 2', ((TO_DATE ('2013-11-30 15:15:30 ', ' yyyy-mm-jj HH24:mi:ss)-TO_DATE ('1970-01-01 00:00:00 ',' yyyy-mm-dd HH24:mi:ss)) * 86400));))

    INSERT INTO my_comment VALUES (6, 2, 'Comment 2 on 2 ticket', ((TO_DATE ('2014-02-13 15:15:30 ', ' yyyy-mm-jj HH24:mi:ss)-TO_DATE ('1970-01-01 00:00:00 ',' yyyy-mm-dd HH24:mi:ss)) * 86400));))

    INSERT INTO my_comment VALUES (7, 2, 'comment on ticket 2 3', ((TO_DATE ('2014-07-30 15:15:30 ', ' yyyy-mm-jj HH24:mi:ss)-TO_DATE ('1970-01-01 00:00:00 ',' yyyy-mm-dd HH24:mi:ss)) * 86400));))

    INSERT INTO my_comment VALUES (8, 2, 'comment on ticket 2 4', ((TO_DATE ('2014-08-09 15:15:30 ', ' yyyy-mm-jj HH24:mi:ss)-TO_DATE ('1970-01-01 00:00:00 ',' yyyy-mm-dd HH24:mi:ss)) * 86400));))

    INSERT INTO my_comment VALUES (9, 3, 'comment 1 ticket of 3', ((TO_DATE ('2001-11-30 15:15:30 ', ' yyyy-mm-jj HH24:mi:ss)-TO_DATE ('1970-01-01 00:00:00 ',' yyyy-mm-dd HH24:mi:ss)) * 86400));))

    INSERT INTO my_comment VALUES (10, 3, 'Comment 2 tickets in 3', ((TO_DATE ('2002-02-13 15:15:30 ', ' yyyy-mm-jj HH24:mi:ss)-TO_DATE ('1970-01-01 00:00:00 ',' yyyy-mm-dd HH24:mi:ss)) * 86400));))

    INSERT INTO my_comment VALUES (11, 3, 'comment on ticket 3 3', ((TO_DATE ('2004-06-30 15:15:30 ', ' yyyy-mm-jj HH24:mi:ss)-TO_DATE ('1970-01-01 00:00:00 ',' yyyy-mm-dd HH24:mi:ss)) * 86400));))

    INSERT INTO my_comment VALUES (12, 3, ' comment 4 tickets in 3', ((TO_DATE ('2004-07-09 15:15:30 ', ' yyyy-mm-jj HH24:mi:ss)-TO_DATE ('1970-01-01 00:00:00 ',' yyyy-mm-dd HH24:mi:ss)) * 86400));))

    INSERT INTO my_comment VALUES (13, 4, 'comment 1 ticket on 4', ((TO_DATE ('2003-11-30 15:15:30 ', ' yyyy-mm-jj HH24:mi:ss)-TO_DATE ('1970-01-01 00:00:00 ',' yyyy-mm-dd HH24:mi:ss)) * 86400));))

    INSERT INTO my_comment VALUES (14, 4, 'Comment 2 tickets in 4', ((TO_DATE ('2004-02-13 15:15:30 ', ' yyyy-mm-jj HH24:mi:ss)-TO_DATE ('1970-01-01 00:00:00 ',' yyyy-mm-dd HH24:mi:ss)) * 86400));))

    INSERT INTO my_comment VALUES (15, 4, 'comment on ticket 4 3', ((TO_DATE ('2004-07-09 15:15:30 ', ' yyyy-mm-jj HH24:mi:ss)-TO_DATE ('1970-01-01 00:00:00 ',' yyyy-mm-dd HH24:mi:ss)) * 86400));))

    INSERT INTO my_comment VALUES (16, 4, ' comment 4 tickets 4', ((TO_DATE ('2006-06-30 15:15:30 ', ' yyyy-mm-jj HH24:mi:ss)-TO_DATE ('1970-01-01 00:00:00 ',' yyyy-mm-dd HH24:mi:ss)) * 86400));))

    INSERT INTO my_comment VALUES (17, 5, 'comment 1 ticket to 1', ((TO_DATE ('2013-11-30 15:15:30 ', ' yyyy-mm-jj HH24:mi:ss)-TO_DATE ('1970-01-01 00:00:00 ',' yyyy-mm-dd HH24:mi:ss)) * 86400));))

    INSERT INTO my_comment VALUES (18, 5, 'Comment 2 on 2 ticket', ((TO_DATE ('2014-02-13 15:15:30 ', ' yyyy-mm-jj HH24:mi:ss)-TO_DATE ('1970-01-01 00:00:00 ',' yyyy-mm-dd HH24:mi:ss)) * 86400));))

    INSERT INTO my_comment VALUES (19, 5, 'comment on ticket 3 3', ((TO_DATE ('2014-06-30 15:15:30 ', ' yyyy-mm-jj HH24:mi:ss)-TO_DATE ('1970-01-01 00:00:00 ',' yyyy-mm-dd HH24:mi:ss)) * 86400));))

    INSERT INTO my_comment VALUES (20, 5, ' comment 4 tickets 4', ((TO_DATE ('2014-07-09 15:15:30 ', ' yyyy-mm-jj HH24:mi:ss)-TO_DATE ('1970-01-01 00:00:00 ',' yyyy-mm-dd HH24:mi:ss)) * 86400));))

    [\code]

    do not use 'UNDER' keyword in alias for the table

    SELECT t.ticket_id,

    t.ticket_description,

    x.c_max_date,

    z.comments_comment

    FROM (SELECT ticket_id, MAX (c.comments_timestamp) AS c_max_date

    OF my_comment c

    WHERE (c.comments_timestamp

    ((TO_DATE ('2013-11-30 15:15:30 ', ' yyyy-mm-jj HH24:mi:ss)-TO_DATE ('1970-01-01 00:00:00 ',' yyyy-mm-dd HH24:mi:ss)) * 86400-60000000)))

    )

    GROUP BY ticket_id) x

    INNER JOIN t ticket

    ON t.ticket_id = x.ticket_id

    INNER JOIN my_comment z

    WE z.comments_timestamp = x.c_max_date;

    ----

    Ramin Hashimzade

  • PL/SQL: ORA-00933: SQL not correctly completed command

    Hello

    CREATE or REPLACE PROCEDURE SAI (STATUS_CODE OUT varchar2)
    AS
    BEGIN
    Select ename emp in STATUS_CODE where empno = '7369';
    END SAI;

    I get the error "* not correctly completed SQL command * ' when executing this procedure. Help, please.

    Hello

    user10503747 wrote:
    Hello

    CREATE or REPLACE PROCEDURE SAI (STATUS_CODE OUT varchar2)
    AS
    BEGIN
    Select ename emp in STATUS_CODE where empno = '7369';
    END SAI;

    I get the error "* not correctly completed SQL command * ' when executing this procedure. Help, please.

    I want to tell u that you made mistake of bases...

    First you write a wrong syntax for your sql statement

    Select ename emp in STATUS_CODE where empno = '7369';

    its should be like

    Select ename from STATUS_CODE from emp where empno = '7369';

    your entire procedure will be as

    CREATE OR REPLACE PROCEDURE SAI (STATUS_CODE out varchar2)
    AS
    BEGIN
    select last_name into STATUS_CODE from employees where employee_id=102;
    END SAI ;
    

    and after that, you must declare a variable of liaison

    Return_name VARIABLE VARCHAR2 (30);

    Then exceute your interior

    exec sai(:return_name);

    print your value of variable binding

    print :return_name;
    
    RETURN_NAME
    --------------------------------
    De Haan
    

    Regards

    UMI

  • Aargh. "sql not correctly completed comand" - something wrong with my join...

    Select *.
    FROM table1 t1
    Join table2 t2 on t1.pkid = t2.pkid

    These aren't my real table names, but this structure is sufficient to generate my mistake. Clearly I can't join syntax. After Google search, I tried various permutations, with the join condition in parens, prefacing the names table with the schema and stuff like that. No change - always get ora00933.

    The only thing that worked was comma-ing, the tables and put the join condition in a where clause clause. Who doesn't for me in the end because the full query I need joined much more and it'll look terrible like that.

    Little help on just a simple inner join?

    Thank you!

    Edited by: sherifffruitfly January 4, 2011 10:18

    The ANSI join syntax was introduced in Oracle in version 9.1. Your version has been out of favor for a dozen years, and is the latest version of Oracle 11.2.

    Unless you can move to something of this century, to do joins in the where clause.

    John

  • Urgent help please.  Inner join caused the error ora-00933

    I ran it, works great:
    SELECT DIFFERENT EXP. EXP_ID,
    EXP. DATU_EXP_WIRE_CENTER_CLLI,
    EXP. DATU_EXP_IP,
    EXP. DATU_EXP_CLLI,
    EXP. DATU_EXP_PORT,
    EXP. DATU_EXP_NAME,
    EXP. DATU_EXP_CITY,
    EXP. DATU_EXP_STATE,
    EXP. DATU_EXP_SW_VERSION,
    DECODE (LAST_ALARM. LAST_ALARM_DATE, NULL, TO_CHAR (SYSDATE, ' YYYY/MM/DD HH24:MI:SS'),
    TO_CHAR (LAST_ALARM. LAST_ALARM_DATE, "YYYY/MM/DD HH24:MI:SS")) AS STATUS_DATE,
    DECODE (LAST_ALARM. ALARM_NAME, NULL, "disconnected", LAST_ALARM. ALARM_NAME) AS DATU_STATUS,
    DECODE (LAST_ALARM. ALARM_CLASS, NULL, 'OTHER', LAST_ALARM. ALARM_CLASS) AS IS_ERROR_STATUS,

    DECODE (LAST_RESOURCE. LAST_ALARM_DATE, NULL, ", TO_CHAR (LAST_RESOURCE. LAST_ALARM_DATE, "YYYY/MM/DD HH24:MI:SS")) AS RESOURCE_STATUS_DATE,
    DECODE (LAST_RESOURCE. RESOURCE_CODE_NAME, NULL, ", LAST_RESOURCE. RESOURCE_CODE_NAME) AS RESOURCE_STATUS,
    DECODE (LAST_RESOURCE. RESOURCE_CODE_CLASS, NULL, ", LAST_RESOURCE. RESOURCE_CODE_CLASS) AS IS_RESOURCE_ERROR_STATUS,
    DECODE (LAST_OPER. LAST_ALARM_DATE, NULL, ", TO_CHAR (LAST_OPER. LAST_ALARM_DATE, "YYYY/MM/DD HH24:MI:SS")) AS OPER_STATUS_DATE,
    DECODE (LAST_OPER. OPER_CODE_NAME, NULL, ", LAST_OPER. OPER_CODE_NAME) AS OPER_STATUS,
    DECODE (LAST_OPER. OPER_CODE_CLASS, NULL, ", LAST_OPER. OPER_CODE_CLASS) AS IS_OPER_ERROR_STATUS,

    EXP BEGIN_MAINT_WINDOW, RTU. RTU_NAME
    OF TT_DATU_EXP_UNIT_INFO EXP
    left outer join
    (SELECT distinct alarmed_datus. EXP_ID, c.ALARM_NAME, c.ALARM_TYPE, c.ALARM_CLASS and alarmed_datus. LAST_ALARM_DATE
    Of alarmed_datus (SELECT EXP_ID, MAX (ALARM_TIME) AS LAST_ALARM_DATE FROM TT_DATU_EXP_ALARM_INFO GROUP BY EXP_ID)
    inner join TT_DATU_EXP_ALARM_INFO b on b.EXP_ID = alarmed_datus. EXP_ID AND b.ALARM_TIME = alarmed_datus. LAST_ALARM_DATE
    inner join TT_DATU_EXP_ALARM_TYPES c on b.ALARM_TYPE = c.ALARM_TYPE
    ) LAST_ALARM on EXP.. EXP_ID = LAST_ALARM. EXP_ID
    left outer join
    (SELECT distinct a.EXP_ID, c.RESOURCE_CODE_NAME, c.RESOURCE_CODE_TYPE, c.RESOURCE_CODE_CLASS, a.LAST_ALARM_DATE
    FROM (SELECT EXP_ID, MAX (RESOURCE_CODE_TIME) AS LAST_ALARM_DATE
    OF TT_DATU_EXP_RESOURCE_CODE_INFO GROUP BY EXP_ID) a
    inner join TT_DATU_EXP_RESOURCE_CODE_INFO b on b.EXP_ID = a.EXP_ID AND b.RESOURCE_CODE_TIME = a.LAST_ALARM_DATE
    inner join TT_DATU_EXP_RESOURCECODE_TYPES c on b.RESOURCE_CODE_TYPE = c.RESOURCE_CODE_TYPE
    ) LAST_RESOURCE on EXP.. EXP_ID = LAST_RESOURCE. EXP_ID
    left outer join
    (SELECT distinct a.EXP_ID, c.OPER_CODE_NAME, c.OPER_CODE_TYPE, c.OPER_CODE_CLASS, a.LAST_ALARM_DATE
    FROM (SELECT EXP_ID, MAX (OPER_CODE_TIME) AS LAST_ALARM_DATE
    OF TT_DATU_EXP_OPER_CODE_INFO GROUP BY EXP_ID) a
    inner join TT_DATU_EXP_OPER_CODE_INFO b on b.EXP_ID = a.EXP_ID AND b.OPER_CODE_TIME = a.LAST_ALARM_DATE
    inner join TT_DATU_EXP_OPER_CODE_TYPES c on b.OPER_CODE_TYPE = c.OPER_CODE_TYPE) LAST_OPER on EXP.. EXP_ID = LAST_OPER. EXP_ID
    inner join TT_DATU_LRN_MAP on exp. EXP_ID = NAB NAB. EXP_ID AND TRIM (NAB. LRN) AS p_LRN
    inner join TT_RTU_TYPES on exp. RTU_TYPE_ID = RTU RTU. RTU_TYPE_ID
    WHERE THERE IS NOT (SOME SATELLITE_EXP_ID OF TT_HOST_SATELLITE WHERE EXP. EXP_ID = SATELLITE_EXP_ID)
    AND EXP.IS_PRIMARY_ADDRESS LIKE p_isPrimary;
    ON THE OTHER
    OPEN FOR V_cursor
    SELECT EXP. EXP_ID,
    EXP. DATU_EXP_WIRE_CENTER_CLLI,
    EXP. DATU_EXP_IP,
    EXP. DATU_EXP_CLLI,
    EXP. DATU_EXP_PORT,
    EXP. DATU_EXP_NAME,
    EXP. DATU_EXP_CITY,
    EXP. DATU_EXP_STATE,
    EXP. DATU_EXP_SW_VERSION,
    DECODE (LAST_ALARM. LAST_ALARM_DATE, NULL, TO_CHAR (SYSDATE, ' YYYY/MM/DD HH24:MI:SS'), TO_CHAR (LAST_ALARM. LAST_ALARM_DATE, "YYYY/MM/DD HH24:MI:SS")) AS STATUS_DATE,
    DECODE (LAST_ALARM. ALARM_NAME, NULL, "disconnected", LAST_ALARM. ALARM_NAME) AS DATU_STATUS,
    DECODE (LAST_ALARM. ALARM_CLASS, NULL, 'OTHER', LAST_ALARM. ALARM_CLASS) AS IS_ERROR_STATUS,

    DECODE (LAST_RESOURCE. LAST_ALARM_DATE, NULL, ", TO_CHAR (LAST_RESOURCE. LAST_ALARM_DATE, "YYYY/MM/DD HH24:MI:SS")) AS RESOURCE_STATUS_DATE,
    DECODE (LAST_RESOURCE. RESOURCE_CODE_NAME, NULL, ", LAST_RESOURCE. RESOURCE_CODE_NAME) AS RESOURCE_STATUS,
    DECODE (LAST_RESOURCE. RESOURCE_CODE_CLASS, NULL, ", LAST_RESOURCE. RESOURCE_CODE_CLASS) AS IS_RESOURCE_ERROR_STATUS,
    DECODE (LAST_OPER. LAST_ALARM_DATE, NULL, ", TO_CHAR (LAST_OPER. LAST_ALARM_DATE, "YYYY/MM/DD HH24:MI:SS")) AS OPER_STATUS_DATE,
    DECODE (LAST_OPER. OPER_CODE_NAME, NULL, ", LAST_OPER. OPER_CODE_NAME) AS OPER_STATUS,
    DECODE (LAST_OPER. OPER_CODE_CLASS, NULL, ", LAST_OPER. OPER_CODE_CLASS) AS IS_OPER_ERROR_STATUS,

    EXP BEGIN_MAINT_WINDOW, RTU. RTU_NAME
    OF TT_DATU_EXP_UNIT_INFO EXP
    (in left outer join
    SELECT distinct alarmed_datus. EXP_ID, c.ALARM_NAME, c.ALARM_TYPE, c.ALARM_CLASS and alarmed_datus. LAST_ALARM_DATE
    Of alarmed_datus (SELECT EXP_ID, MAX (ALARM_TIME) AS LAST_ALARM_DATE FROM TT_DATU_EXP_ALARM_INFO GROUP BY EXP_ID)
    inner join TT_DATU_EXP_ALARM_INFO b on b.EXP_ID = alarmed_datus. EXP_ID AND b.ALARM_TIME = alarmed_datus. LAST_ALARM_DATE
    inner join TT_DATU_EXP_ALARM_TYPES c on b.ALARM_TYPE = c.ALARM_TYPE)
    LAST_ALARM on EXP.. EXP_ID = LAST_ALARM. EXP_ID
    left outer join
    (SELECT distinct a.EXP_ID, c.RESOURCE_CODE_NAME, c.RESOURCE_CODE_TYPE, c.RESOURCE_CODE_CLASS, a.LAST_ALARM_DATE
    FROM (SELECT EXP_ID, MAX (RESOURCE_CODE_TIME) AS LAST_ALARM_DATE
    OF TT_DATU_EXP_RESOURCE_CODE_INFO GROUP BY EXP_ID) a
    inner join TT_DATU_EXP_RESOURCE_CODE_INFO b on b.EXP_ID = a.EXP_ID AND b.RESOURCE_CODE_TIME = a.LAST_ALARM_DATE
    inner join TT_DATU_EXP_RESOURCECODE_TYPES c on b.RESOURCE_CODE_TYPE = c.RESOURCE_CODE_TYPE) LAST_RESOURCE on EXP.. EXP_ID = LAST_RESOURCE. EXP_ID
    left outer join
    (SELECT distinct a.EXP_ID, c.OPER_CODE_NAME, c.OPER_CODE_TYPE, c.OPER_CODE_CLASS, a.LAST_ALARM_DATE
    FROM (SELECT EXP_ID, MAX (OPER_CODE_TIME) AS LAST_ALARM_DATE
    OF TT_DATU_EXP_OPER_CODE_INFO GROUP BY EXP_ID) a
    inner join TT_DATU_EXP_OPER_CODE_INFO b on b.EXP_ID = a.EXP_ID AND b.OPER_CODE_TIME = a.LAST_ALARM_DATE
    inner join TT_DATU_EXP_OPER_CODE_TYPES c on b.OPER_CODE_TYPE = c.OPER_CODE_TYPE
    ) LAST_OPER on EXP.. EXP_ID = LAST_OPER. EXP_ID ORDER BY EXP. DATU_EXP_CLLI
    inner join TT_RTU_TYPES on exp. RTU_TYPE_ID = RTU RTU. RTU_TYPE_ID
    WHERE THERE is NOT (SOME SATELLITE_EXP_ID OF TT_HOST_SATELLITE WHERE EXP.. EXP_ID = SATELLITE_EXP_ID) AND EXP.IS_PRIMARY_ADDRESS love
    p_isPrimary;


    However this one:

    SELECT EXP. EXP_ID,
    EXP. DATU_EXP_WIRE_CENTER_CLLI,
    EXP. DATU_EXP_IP,
    EXP. DATU_EXP_CLLI,
    EXP. DATU_EXP_PORT,
    EXP. DATU_EXP_NAME,
    EXP. DATU_EXP_CITY,
    EXP. DATU_EXP_STATE,
    EXP. DATU_EXP_SW_VERSION,
    DECODE (LAST_ALARM. LAST_ALARM_DATE, NULL, TO_CHAR (SYSDATE, ' YYYY/MM/DD HH24:MI:SS'),
    TO_CHAR (LAST_ALARM. LAST_ALARM_DATE, "YYYY/MM/DD HH24:MI:SS")) AS STATUS_DATE,
    DECODE (LAST_ALARM. ALARM_NAME, NULL, "disconnected", LAST_ALARM. ALARM_NAME) AS DATU_STATUS,
    DECODE (LAST_ALARM. ALARM_CLASS, NULL, 'OTHER', LAST_ALARM. ALARM_CLASS) AS IS_ERROR_STATUS,


    DECODE (LAST_RESOURCE. LAST_ALARM_DATE, NULL, ", TO_CHAR (LAST_RESOURCE. LAST_ALARM_DATE, "YYYY/MM/DD HH24:MI:SS")) AS RESOURCE_STATUS_DATE,
    DECODE (LAST_RESOURCE. RESOURCE_CODE_NAME, NULL, ", LAST_RESOURCE. RESOURCE_CODE_NAME) AS RESOURCE_STATUS,
    DECODE (LAST_RESOURCE. RESOURCE_CODE_CLASS, NULL, ", LAST_RESOURCE. RESOURCE_CODE_CLASS) AS IS_RESOURCE_ERROR_STATUS,
    DECODE (LAST_OPER. LAST_ALARM_DATE, NULL, ", TO_CHAR (LAST_OPER. LAST_ALARM_DATE, "YYYY/MM/DD HH24:MI:SS")) AS OPER_STATUS_DATE,
    DECODE (LAST_OPER. OPER_CODE_NAME, NULL, ", LAST_OPER. OPER_CODE_NAME) AS OPER_STATUS,
    DECODE (LAST_OPER. OPER_CODE_CLASS, NULL, ", LAST_OPER. OPER_CODE_CLASS) AS IS_OPER_ERROR_STATUS,


    EXP BEGIN_MAINT_WINDOW, RTU. RTU_NAME
    OF TT_DATU_EXP_UNIT_INFO EXP
    left outer join
    (
    SELECT distinct alarmed_datus. EXP_ID, c.ALARM_NAME, c.ALARM_TYPE, c.ALARM_CLASS and alarmed_datus. LAST_ALARM_DATE
    Of alarmed_datus (SELECT EXP_ID, MAX (ALARM_TIME) AS LAST_ALARM_DATE FROM TT_DATU_EXP_ALARM_INFO GROUP BY EXP_ID)
    inner join TT_DATU_EXP_ALARM_INFO b on b.EXP_ID = alarmed_datus. EXP_ID AND b.ALARM_TIME = alarmed_datus. LAST_ALARM_DATE
    inner join TT_DATU_EXP_ALARM_TYPES c on b.ALARM_TYPE = c.ALARM_TYPE) LAST_ALARM on EXP.. EXP_ID = LAST_ALARM. EXP_ID

    left outer join
    (SELECT distinct a.EXP_ID, c.RESOURCE_CODE_NAME, c.RESOURCE_CODE_TYPE, c.RESOURCE_CODE_CLASS, a.LAST_ALARM_DATE
    FROM (SELECT EXP_ID, MAX (RESOURCE_CODE_TIME) AS LAST_ALARM_DATE
    OF TT_DATU_EXP_RESOURCE_CODE_INFO GROUP BY EXP_ID) a
    inner join TT_DATU_EXP_RESOURCE_CODE_INFO b on b.EXP_ID = a.EXP_ID AND b.RESOURCE_CODE_TIME = a.LAST_ALARM_DATE
    inner join TT_DATU_EXP_RESOURCECODE_TYPES c on b.RESOURCE_CODE_TYPE = c.RESOURCE_CODE_TYPE) LAST_RESOURCE on EXP.. EXP_ID = LAST_RESOURCE. EXP_ID
    left outer join
    (SELECT distinct a.EXP_ID, c.OPER_CODE_NAME, c.OPER_CODE_TYPE, c.OPER_CODE_CLASS, a.LAST_ALARM_DATE
    FROM (SELECT EXP_ID, MAX (OPER_CODE_TIME) AS LAST_ALARM_DATE
    OF TT_DATU_EXP_OPER_CODE_INFO GROUP BY EXP_ID) a
    inner join TT_DATU_EXP_OPER_CODE_INFO b on b.EXP_ID = a.EXP_ID AND b.OPER_CODE_TIME = a.LAST_ALARM_DATE
    inner join TT_DATU_EXP_OPER_CODE_TYPES c on b.OPER_CODE_TYPE = c.OPER_CODE_TYPE
    ) LAST_OPER on EXP.. EXP_ID = LAST_OPER. EXP_ID ORDER BY EXP. DATU_EXP_CLLI
    inner join TT_RTU_TYPES on exp. RTU_TYPE_ID = RTU RTU. RTU_TYPE_ID
    WHERE the EXP.IS_PRIMARY_ADDRESS as p_isPrimary;

    It does not work kept send me errors:
    [ORA-00933: SQL not correctly completed command]


    Any guru can help? I need to have this resolved effect today.
    Thanks in advance.
  • Can someone help me - error:-not correctly completed SQL command

    Hello

    This code has an error, I tried to find this error but I don't find it so please help me: -.

    error report:
    ORA-06550: line 1, column 149:
    PL/SQL: ORA-00933: SQL not correctly completed command
    ORA-06550: line 1, column 7:
    PL/SQL: SQL statement ignored

    Code

    Select HTMLDB_ITEM. HIDDEN(1,SEQ_ID),
    HTMLDB_ITEM. C001 Text(2,a.C001).
    HTMLDB_ITEM. C002 Text(3,a.C002).
    HTMLDB_ITEM. C003 Text(4,a.C003).
    APEX_ITEM. SELECT_LIST_FROM_QUERY (5, a.c004, 'SELECT D P_ID, P_ID R OF PARTY_DETAIL') c004.
    APEX_ITEM. SELECT_LIST_FROM_QUERY
    (6, a.c005,)
    ' SELECT CATEGARY_NAME D, ' |' CATEGARY_NAME ITEM_CATEGARY R'.
    "style =" width: 220px "'"
    ||' OnChange = "get_select_list_xml1 (this, e
    || 'f7_ '.
    || LPAD (seq_id, 4, '0')
    || ')"',
    '' YES. ''
    '0',
    "- Select -",
    « f6_ » || LPAD (seq_id, 4, '0'),
    NULL,
    'NO') c005
    APEX_ITEM. SELECT_LIST_FROM_QUERY
    (7, a.c006,)
    "SELECT ITEM_CODE D.
    ||' ITEM_CODE ITEM_MASTER R'
    ||' WHERE CATEGARY_NAME ='
    || C005,
    "style =" width: 220px "',"
    '' YES. ''
    '0',
    "- Select Code (')"
    || (Select Count (*)
    of ITEM_MASTER
    where CATEGARY_NAME = c005)
    || ')-',
    « f7_ » || LPAD (seq_id, 4, '0'),
    NULL,
    'NO') c006
    APEX_ITEM. SELECT_LIST_FROM_QUERY (8, a.c007, 'SELECT nom_element, nom_element R OF ITEM_MASTER D') c007,.
    HTMLDB_ITEM. C008 Text(9,a.C008).
    APEX_ITEM. SELECT_LIST_FROM_QUERY (10, a.c009, 'SELECT PACK_TYPE D, PACK_TYPE R OF ITEM_PACKING') c009,.
    HTMLDB_ITEM. Text(11,a.C010) c010.
    HTMLDB_ITEM. Text(12,a.C011) c011.
    HTMLDB_ITEM. C012 Text(13,a.C012).
    HTMLDB_ITEM. C013 Text(14,a.C013)
    OF wwv_flow_collections one
    where a.collection_name = 'REC_ITEM. '




    Thank you
    Maury

    Published by: Ed on September 10, 2009 03:36

    Can you copy and paste this code into SQL * more and see if it runs properly? You can check your single quote (') and double quote characters ("") to make sure that those who at the height correctly because it is difficult to say when copied on the web.

  • ORA-00933 sql is not properly completed.

    Dear members,

    I have the following query in Report Builder 10g,

    Select a, b, c
    FROM table1
    where a = 12

    & p_whr_fy & p_whr_supp & p_whr_bt & p_whr_mat_spec & p_whr_lc_num & p_whr_cotton & P_WHR_LOC_ID

    Union of all the

    Select a, b, c
    from table2
    where a = 12

    & p_whr_fy & p_whr_supp & p_whr_bt & p_whr_mat_spec & p_whr_lc_num & p_whr_cotton & P_WHR_LOC_ID

    Here I used the lexical settings, and with spaces in the lines its ok but when trying to change the query / remove spaces in the lines, it gives the error.

    ORA-00933 sql not successfully completed

    With regard to:

    Hello
    Check your default values for substitution variables, at least one of them is not empty and causes an error.
    kikolus

  • SQL error: ORA-01840: value not long enough for the format of the date of entry

    It is a delete SQL in a driver of demand, which gives no error, but does remove all the lines either. I have converted the removal 'from' to ' Select * ' and may see the following error:

    Select * FROM PS_GPDE_DV_TRIG40 WHERE EXISTS (SELECT FROM 'X'
    PS_GPDE_DV_ELIG_MO ELG WHERE ELG. EMPLID = PS_GPDE_DV_TRIG40. EMPLID AND
    ELG. EMPL_RCD = PS_GPDE_DV_TRIG40. EMPL_RCD AND TO_DATE (TO_CHAR (ELG. PRD_END_DT
    "YYYY"). TO_CHAR (ELG. PRD_END_DT, "MM"). '01', "YYYY-MM-DD") =.
    PS_GPDE_DV_TRIG40. GPDE_DV_EVT_EFFDT AND ELG. CAL_RUN_ID = "CAL_0812")
    Error report:
    SQL error: ORA-01840: value not long enough for the format of the date of entry


    The interesting thing is that if I attach a condition of emplid, then the SQL above does not give an error and return lines:

    Select * FROM PS_GPDE_DV_TRIG40 WHERE EXISTS (SELECT FROM 'X'
    PS_GPDE_DV_ELIG_MO ELG WHERE ELG. EMPLID = PS_GPDE_DV_TRIG40. EMPLID AND
    ELG. EMPL_RCD = PS_GPDE_DV_TRIG40. EMPL_RCD AND TO_DATE (TO_CHAR (ELG. PRD_END_DT
    "YYYY"). TO_CHAR (ELG. PRD_END_DT, "MM"). '01', "YYYY-MM-DD") =.
    PS_GPDE_DV_TRIG40. GPDE_DV_EVT_EFFDT AND ELG. CAL_RUN_ID = "FM_CG_0812")
    and emplid = "1234"

    now, if the number of lines is identified (by giving more number of emplids), it begins to give the error when the number of rows returned is greater than about 30. It is completely independent of what employee is used, so there is no question of data dependence.

    Function optimizer cost is off and a subquery nest is off on the init.ora file

    subquery UNNEST= false

    optimizercost_based_transformation = off


    I don't know if it has something to do with this problem.

    Explanations would be welcome!

    Thank you
    Vikas

    I think it is question of data combined with a not very sensible date format mask (it could fail when the null data, because of your concatenation with '01' and work when not null data).
    Have you tried with a simple TRUNC?

    Your code:

    ...TO_DATE(TO_CHAR(ELG.PRD_END_DT, 'YYYY') || TO_CHAR(ELG.PRD_END_DT , 'MM') || '01' , 'YYYY-MM-DD') =PS_GPDE_DV_TRIG40.GPDE_DV_EVT_EFFDT...
    

    After change:

    ...TRUNC(ELG.PRD_END_DT , 'MM') =PS_GPDE_DV_TRIG40.GPDE_DV_EVT_EFFDT...
    

    Nicolas.

  • Error ORA-00933

    Hi all, when I try to perform under query I get PL/SQL: ORA-00933: not correctly completed SQL command can someone tell where I'm wrong?
    DECLARE
    
    V_HEADER_ID NUMBER;
    
    V_GROUP_ID NUMBER;
    
    
    BEGIN
    
    
    select regal.regal_inv_landed_cost_seq.nextval.NEXTVAL into V_GROUP_ID from dual ;
    
    select regal.regal_inv_landed_cost_seq.nextval.currval into V_HEADER_ID from dual ;
    
    INSERT INTO rcv_transactions_interface 
    (
                 INTERFACE_TRANSACTION_ID,
                 HEADER_INTERFACE_ID,
                 GROUP_ID,
                 TRANSACTION_TYPE,
                 TRANSACTION_DATE,
                 PROCESSING_STATUS_CODE,
                 PROCESSING_MODE_CODE,
                 TRANSACTION_STATUS_CODE,
                 QUANTITY,
                 LAST_UPDATE_DATE,
                 LAST_UPDATED_BY,
                 CREATION_DATE,
                 CREATED_BY,
                 RECEIPT_SOURCE_CODE,
                 DESTINATION_TYPE_CODE,
                 AUTO_TRANSACT_CODE,
                 SOURCE_DOCUMENT_CODE,
                 UNIT_OF_MEASURE,
                 ITEM_ID,
                 UOM_CODE,
                 EMPLOYEE_ID,
                 SHIPMENT_HEADER_ID,
                 SHIPMENT_LINE_ID,
                 TO_ORGANIZATION_ID,
                 SUBINVENTORY_ID,
                 FROM_ORGANIZATION_ID,
                 FROM_SUBINVENTORY
    )
    SELECT 
         regal.regal_inv_landed_cost_seq.nextval,      --Interface_transaction_id
         V_HEADER_ID,                                  --Header Interface ID
         V_GROUP_ID,                                    --Group ID
         'Ship',                                       --Transaction Type
         sysdate,                                      --Transaction Date
         'PENDING',                                    --Processing Status Code
         'BATCH',                                      --Processing Mode Code
         'PENDING',                                    --Transaction Status Code
         lc.quantity_received,                          --Quantity
         lc.last_update_date,                          --last update date
         lc.last_updated_by,                           --last updated by
         sysdate,                                      --creation date
         lc.created_by,                                --created by
         'INVENTORY',                                  --Receipt source Code
         'INVENTORY',                                  --Destination Type Code
         'DELIVER' ,                                    --AUT Transact Code
         'INVENTORY',                                  --Source Document Code
          msi.primary_uom_code ,                       --Unit Of Measure
          msi.inventory_item_id,                        --Item ID
          msi.primary_unit_of_measure,                  --UOM COde
          regal.regal_inv_landed_cost_seq.curval,       --Shipment Header ID
          regal.regal_inv_landed_cost_seq.curval,       --SHipment Line ID
          82,                                           --To Organization ID
          'Brooklyn',                                     --Sub Inventory ID
          81,                                            --From Organization
          'Vessel'                                       --From Subinventory
      
      FROM
         regal.regal_inv_landed_cost_tab lc,
         mtl_system_items msi
    
      WHERE
         lc.organization_id = msi.organization_id
         AND  lc.inventory_item_id = msi.inventory_item_id
    END;
    
    ERROR at line 70:
    ORA-06550: line 69, column 56:
    PL/SQL: ORA-00933: SQL command not properly ended
    ORA-06550: line 7, column 1:
    PL/SQL: SQL Statement ignored
    ORA-06550: line 70, column 4:
    PLS-00103: Encountered the symbol "end-of-file" 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
    Thanks in advance!

    These lines:

    Sandy wrote:

    select regal.regal_inv_landed_cost_seq.nextval.NEXTVAL into V_GROUP_ID from dual ;
    
    select regal.regal_inv_landed_cost_seq.nextval.currval into V_HEADER_ID from dual ;
    

    Probably should be this instead:

    select regal.regal_inv_landed_cost_seq.NEXTVAL into V_GROUP_ID from dual;
    select regal.regal_inv_landed_cost_seq.currval into V_HEADER_ID from dual;
    
  • Not correctly completed SQL command

    can not find why this error occurs: not correctly completed SQL command

    PROCEDURE FORMA4_25_11)

    P_GO IN VARCHAR2,

    P_DATE_1 IN VARCHAR2,

    P_DATE_2 IN VARCHAR2,

    P_DAY_COUNT NUMBER,

    DATA_SET ON SYS_REFCURSOR)

    AS

    DB_QUERY VARCHAR (32767).

    BEGIN

    DB_QUERY: = ' SELECT T1.ad, T1.admin_count, T1.cnt)

    SELECT dc.NAME ad,

    Count (am. IDN) admin_count,.

    Admn.Say NTC

    SINCE DC dictionaries.customs

    INNER JOIN kadr.tper_master mf

    ON mf.branch_code = dc.code_int AND mf.status = 0

    INNER JOIN vpdgk.vp_admin am

    ON am.mufet_id = mf.idn

    LEFT JOIN (SELECT branch_code,

    Say Count (branch_code) AS

    OF (m_id SELECT c.mufet_id,

    b.branch_code,

    Count (c.mufet_id) mufet_count

    OF vpdgk.vp_qeydiyyat A

    INNER JOIN kadr.tper_master b

    ON b.idn = a.mufet_id

    INNER JOIN vpdgk.vp_admin c

    ON c.mufet_id = A.mufet_id

    AND (c.uid_ IS NOT NULL

    GOLD c.uid_reserv IS NOT NULL)

    INNER JOIN dictionaries.customs d

    ON d.code_int = b.branch_code

    WHEN Trunc (A.insert_date) BETWEEN

    TO_DATE('''||) P_DATE_1 | " ', "DD. MM YYYY ")

    AND

    TO_DATE('''||) P_DATE_2 | " ', "DD. MM YYYY ")

    C.mufet_id GROUP, b.branch_code

    HAVING COUNT (c.mufet_id) < ' | P_DAY_COUNT |')

    GROUP BY branch_code Admn)

    ON admn.branch_code = dc.code_int

    Dc.NAME, admn.say) AS T1 WHERE T1.ad = ' | P_GO | ";

    DATA_SET OPEN FOR DB_QUERY;

    END;

    Hi Afa

    At the end of SQL you write 'AS '. Remove it

    Excample:

  • Error ORA-16724: could not resolve the deficit for one or more databases in waiting

    I came to work today with the following error is displayed:

    February 5, 2014 01:27:19 error ORA-16778: make the mistake of transport for one or more databases.


    Looks like this error disappeared but now I have the following error:

    February 5, 2014 11:52:40 error ORA-16724: could not resolve the deficit for one or more databases in waiting

    I did some research on the forums and I think I need backup and restore, but I'm not sure.

    Here are some questions that I saw others asking in the forums:

    PRIMARY:

    Select max(sequence#) from v$ archived_log; -24589

    Select current_scn in the database of v$. -871568619

    SECONDARY:

    Select max(sequence#) from v$ archived_log; -24589

    Select max(sequence#) from v$ archived_log in case of application = 'YES '; -24562

    Select current_scn in the database of v$. -870987797

    Select * from v$ archive_gap;

    Thread # Low_Sequence # High_Sequence #.

    1 24563 24563

    Looks like everything is working, but the error is still appearing in OEM primer.

    The issue ended up being with the control file. I followed of many blog posts on how to roll forward the database before and they all said to restore the control file before you recover the database. I followed this paper: http://docs.oracle.com/cd/B28359_01/server.111/b28294/rman.htm#CIHIAADC and it worked as expected. The old control file has had 6 data files that were in a different place than the others. The new control file, I created the primary had all the files of data in one place. After correcting the control to point to the locations correct datafile all started working again.

  • error code 259 does not correctly updated to sp62736.

    I have a Hp Pavilion 500-141ea im trying to update the IDT audio driver for windows 8, I supported SP sp62736, it passes through the installation procedure, then it stops and comes up with this error code 259 does not correctly updated, I even disabled etc still the same antivirus software.

    Any idea?

    Hi Apache1968,

    If everything works at the moment, with the exception of downloading then I would leave it as it is. The whole "don't mess with what works" thing.

    Thank you

  • At the start of the ODC: error 20036: Description of error: ORA-06413: connection not open

    Hi all

    I am new to Oracle Document Capture. I installed ODDC on my windows 7 machine and launching that I gave a few local DB references. Since then, I'm not able to open Capture of Document Oracle and I'm not able to change any installation. I am still getting error below and when you click on OK the window closes. I couldn't find any place where I can change this configuration.

    Failed to connect.

    Error number: 20036

    Error description: [the following error occurred connecting to the database:]

    Error number: 20036

    Error description: the following error occurred connecting to the database:

    Error ID: 16389

    Description of error: ORA-06413: connection not open.

    ]

    I tried to uninstall ODC, deletion of data program for the Capture of Document Oracle and re-installed. Still the same error.

    Can someone help me please. I am completely struck with it.

    Thank you

    UMA.

    Problem solved after the installation of the 32-bit oracle client and the ODAC.

    Thank you

Maybe you are looking for

  • Quick question from a newbie

    I want to implement VOIP trunk between two fixed location. Location A is as B location is the work from home. There is a virtual private network between the two, they are on different subnets. I want to access the PSTN line to site B to Site A (home)

  • Configuration of disks Z820

    Hello There is a question that has been bothering me since I got my Z820: How do you get the readers in the 4 sleds to be managed by the C600 Intel instead of the LSI SAS 2308? I'm in the same boat a lot with SSD, SSD experience less-than-stellar wri

  • MeasureString alternative?

    Hi everyone (again), I was wondering if Adobe AIR or the SDK contained a sort of alternative to the measureString method #. For this unfamiliar with this method, you supply a string and a police, and this method returns the length of the string in pi

  • Z10 allocated to the wrong Contact incoming text Messages blackBerry

    Recently, I received my Zed10 return of warranty repair for an out of the box of malfunctioning headset port and is now experiencing a thousand times more frustrating issues.  The phone is now problems when I got a text message in which he he attribu

  • Cannot install any photo editing software on windows 7

    I tried to install the 3 programs editing different photo on my computer. was'nt able to install a