SQL STATEMENT NOT PROPERLY ENDED - HELP NEEDED

Can anyone tell me the error in this code, I get an error message sql statement not properly ended when I run it.
update MODT set rootobj=(SELECT REF(A) FROM
OR_COMP_T A
WHERE A.ID=O.ID)
AS OR_COMP_T_REF)
FROM OLD_MODT O where id = 1;

Hi, here is the schema and the expected results.
=======================================================================================
CREATE TYPE OR_MODT_OBJ;
CREATE TYPE OR_MODT_OBJ_REF AS TABLE OF REF OR_MODT_OBJ;
=================================================
CREATE OR REPLACE TYPE OR_COMP_T_OBJ
(id number (6),
typ char (4),
SUPERID REF OR_COMP_T_OBJ,
MOD REF OR_MODT_OBJ);
=================================================
CREATE OR REPLACE TYPE OR_COMP_T_REF AS TABLE OF REF OR_COMP_T_OBJ;
=================================================
CREATE TABLE OR_COMP_T OF OR_COMP_T_OBJ
=================================================
CREATE TYPE OR_MODT_OBJ
(id number (6),
typ char (4),
rootobj REF OR_COMP_T_OBJ,
comp_tb     OR_COMP_T_REF);
=================================================
CREATE TABLE MODT OF OR_MODT_OBJ
NESTED COMP_TB STORE AS COMP_TB_NESTED;
=================================================
INSERT INTO OR_MODT (ID,TYP,ROOTOBJ,COMP_TB)
SELECT ID,TYP,NULL,NULL FROM OLD_MODT;
INSERT INTO OR_COMP_T(ID,TYP,SUPERID,MOD)
SELECT ID,TYP,NULL,NULL FROM OLD_OR_COMP_T;
==================================================
There are two rows in OLD_MODT, and these two rows are to be inserted into OR_MODT.
They are:
Sample data in OLD_MODT are:
id,      typ,     rootobj
1     type1     1
2     type3     365
=================================================
Data from OLD_OR_COMP_T is to be inserted into OR_COMP_T as well, and likewise, it has a ref to OR_MODT, so the ref data was not inserted at the same time.
Now OLD_OR_COMP_T has a number of rows but attribute MOD for two of these rows os the rootobj for OR_MODT,
such that:
id     typ     superID     mod
1     type4     NULL     1
2     type2     10101     1
3     type     20202     1
365     type2     NULL     2
366     type2     20202     2
I want to get the ID of OR_COMP_T where ID is 1 and where ID is 365. These values are to be in rootobj.
I also want to get the value of ID in OR_MODT to be placed in MOD of OR_COMP_T.
PLEASE HELP ME.

Similar Messages

  • Any One Can Help Me--error :-SQL command not properly ended

    hi,
    this code has an error i have tried to find out this error but i can't find it so please help me :-
    report error:
    ORA-06550: line 1, column 149:
    PL/SQL: ORA-00933: SQL command not properly ended
    ORA-06550: line 1, column 7:
    PL/SQL: SQL Statement ignored
    Code
    select HTMLDB_ITEM.HIDDEN(1,SEQ_ID),
    HTMLDB_ITEM.TEXT(2,a.c001) c001,
    HTMLDB_ITEM.TEXT(3,a.c002) c002,
    HTMLDB_ITEM.TEXT(4,a.c003) c003,
    APEX_ITEM.SELECT_LIST_FROM_QUERY(5,a.c004,'SELECT P_ID D,P_ID R FROM PARTY_DETAIL') c004,
    APEX_ITEM.SELECT_LIST_FROM_QUERY
    (6,a.c005,
    'SELECT CATEGARY_NAME D,'||'CATEGARY_NAME R FROM ITEM_CATEGARY',
    'style="width:220px" '
    ||'onchange="get_select_list_xml1(this,'
    || '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 R FROM ITEM_MASTER'
    ||'WHERE CATEGARY_NAME ='
    || c005,
    'style="width:220px"',
    'YES',
    '0',
    '-Select Code ('
    || (Select Count(*)
    from 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 ITEM_NAME D,ITEM_NAME R FROM ITEM_MASTER') c007,
    HTMLDB_ITEM.TEXT(9,a.c008) c008,
    APEX_ITEM.SELECT_LIST_FROM_QUERY(10,a.c009,'SELECT PACK_TYPE D,PACK_TYPE R FROM ITEM_PACKING') c009,
    HTMLDB_ITEM.TEXT(11,a.c010) c010,
    HTMLDB_ITEM.TEXT(12,a.c011) c011,
    HTMLDB_ITEM.TEXT(13,a.c012) c012,
    HTMLDB_ITEM.TEXT(14,a.c013) c013
    FROM wwv_flow_collections a
    where a.collection_name = 'REC_ITEM'
    Thanks
    Manoj
    Edited by: Manoj Kaushik on Sep 10, 2009 3:36 AM

    hi mike,
    My problem is:-
    i have a bill with multiple item eg . Apple (12), Banana (49), Badam (145) , Grapes(25) with there quantity and now i want to Add these item with quantity in my database
    when i finaly click on submit button .
    Actully I have been used tabular form but i am facing one problem when using tabular form ,in Tabular form i enter first item eg . Apple and there quantity eg. 12 in textfield and after click on Add Row Buttom data insert in to the database . but i want Entry Shouldn't go in to the database. But only New Row Should Add there when i click on Add Row Button.
    I want all these 4 item should enter in to data base when i click on Final Submit.
    So i have use this collection report to insert multiple item .everything was all right when i was using text field but when i changed these textfield into select list then error has arise .
    Actually i want also a cascade selectlist in this report .
    eg .item name depend on item code and item code depend on item category name .
    so i want when i select CATEGARY_NAME then item code come into report item and when i select ietem code them correcponding item name should come into item name field.
    for cascade select list i have created application process and java script .
    So please mike Suggest me some solution how can i do this .
    its urgent for me .
    This Is my code :-
    select HTMLDB_ITEM.HIDDEN(1,SEQ_ID),
    APEX_ITEM.TEXT(2,a.c001) c001,
    APEX_ITEM.TEXT(3,a.c002) c002,
    APEX_ITEM.TEXT(4,a.c003) c003,
    APEX_ITEM.SELECT_LIST_FROM_QUERY(5,a.c004,'SELECT P_ID D,P_ID R FROM PARTY_DETAIL') c004,
    APEX_ITEM.SELECT_LIST_FROM_QUERY
    (6,a.c005,
    'SELECT CATEGARY_NAME D,'||'CATEGARY_NAME R FROM ITEM_CATEGARY',
    'style="width:220px" '
    ||'onchange="get_select_list_xml1(this,''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 R FROM ITEM_MASTER'
    ||'WHERE CATEGARY_NAME ='
    || c005,
    'style="width:220px"',
    'YES',
    '0',
    '-Select Code ('
    || (Select Count(*)
    from 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 ITEM_NAME D,ITEM_NAME R FROM ITEM_MASTER') c007,
    APEX_ITEM.TEXT(9,a.c008) c008,
    APEX_ITEM.SELECT_LIST_FROM_QUERY(10,a.c009,'SELECT PACK_TYPE D,PACK_TYPE R FROM ITEM_PACKING') c009,
    APEX_ITEM.TEXT(11,a.c010) c010,
    APEX_ITEM.TEXT(12,a.c011) c011,
    APEX_ITEM.TEXT(13,a.c012) c012,
    APEX_ITEM.TEXT(14,a.c013) c013
    FROM wwv_flow_collections a
    where a.collection_name = 'REC_ITEM'
    I am waiting for your positive responce.
    thanks
    Manoj
    Edited by: Manoj Kaushik on Sep 10, 2009 4:46 AM

  • Error in SQl Query - SQl Command not properly ended

    Hi All
    I have this SQL query that returns the following error when I run it in TOAD:
    SELECT
    VC.CAMPAIGN_NUMBER,VC.CAMPAIGN_TITLE,VC.CAMPAIGN_DESC,
    VCV.START_DATE, VCV.END_DATE,VC.CAMPAIGN_TYPE,VC.APPLICABILITY,
    VC.CAMPAIGN_PRIORITY
         FROM
         VM_CAMPAIGN_VIN VCV ,VM_CAMPAIGN VC
         WHERE
              VCV.VIN = 'US'
              AND
    VCV.CAMPAIGN_NUMBER = VC.CAMPAIGN_NUMBER AND VC.COUNTRY_CODE = 'E'
              AND VC.LANGUAGE_CODE = 'L' AND VC.CAMPAIGN_TYPE = null
    AND SYSDATE BETWEEN VCV.START_DATE AND VCV.END_DATE
    AND SYSDATE BETWEEN VC.START_DATE AND VC.END_DATE)
    A ORDER BY A.CAMPAIGN_PRIORITY DESC, A.END_DATE
    The error is:
    SQl Command not properly ended
    Any help is highly appreciated. Thanks

    Thanks a lot to everyone. It helped me run the query without any problem. Now I have another issue. This may not be the right place to post this question, I think.My apologies for that. The problem is, Weblogic posts an error as follows:
    java.sql.SQLException: ORA-00923: FROM keyword not found where expected
    I am wondering if this is an Java related error or an SQL related error.
    Well, I am using the SQL Statement which you helped debug, and it is inside something called "XXSQLConstants.java consisting of the following SQL statement:
    public static final String XX_ALL_CAMPS_SELECT = "SELECT * FROM" +
         "(SELECT vc.campaign_number, vc.campaign_title, vc.campaign_desc, vc.start_date," +
         "vc.end_date, vc.campaign_type, vc.applicability, vc.campaign_priority" +
    "FROM vm_campaign vc" +
    "WHERE vc.applicability = 'Y'" +
    "AND vc.country_code = ? " +
    "AND vc.language_code = ? " +
    "AND vc.campaign_type = ? "+
    "AND SYSDATE BETWEEN vc.start_date AND vc.end_date" +
    "AND NOT EXISTS (" +
    "SELECT 'X'" +
    "FROM vm_campaign_vin vcv" +
    "WHERE (vcv.vin = ? " +
    "AND vcv.campaign_number = vc.campaign_number" +
    "))" +
         "UNION" +
         "SELECT vc.campaign_number, vc.campaign_title, vc.campaign_desc," +
         "vcv.start_date, vcv.end_date, vc.campaign_type, vc.applicability," +
    "vc.campaign_priority" +
    "FROM vm_campaign_vin vcv, vm_campaign vc" +
    "WHERE vcv.vin = ? " +
    "AND vcv.campaign_number = vc.campaign_number" +
    "AND vc.country_code = ? " +
    "AND vc.language_code = ? " +
    "AND vc.campaign_type IS NULL" +
    "AND SYSDATE BETWEEN vcv.start_date AND vcv.end_date" +
    "AND SYSDATE BETWEEN vc.start_date AND vc.end_date)";
    The SQl runs fine when tested (well, it does not return any data for the rows returned, but there are no errors), but in my application server I get the following error (pointing out the same SQL code pasted above:
    java.sql.SQLException: ORA-00923: FROM keyword not found where expected
    Any suggestions? Thanks in advance. I appreciate all replies

  • SQL Error [ORA-00933: SQL command not properly ended

    I have following installed:
    7.9.6 BI Apps
    10.1.3.4 DAC
    8.6.0 Informatica
    Container JDE Enterprise 9.0
    Out of 211 tasks 69 tasks executed successfully.
    Error in workflow [SDE_JDE_PartyOrganisationDimension_Full].
    I have checked the session log file and understand that there is error with the SQL statement.
    Since it is Pre-built, the workflow should have run properly with correct SQl statement. But in this case it is not working.
    Is it because the SQL statement is too long?
    Any help will be greatly appreciated.
    Part of the log file
    RR_4035 : SQL Error [
    ORA-00933: SQL command not properly ended
    Database driver error...
    Function Name : Execute
    SQL Stmt : SELECT
    F0101.ABAN8,F0101.ABALKY,F0101.ABTAX,F0101.ABALPH,F0101.ABMCU,F0101.ABSIC,F0101.ABAT1, F0101.ABTAXC, F0101.ABATP, F0101.ABATR,F0101.ABEFTB,F0101.ABAC01,
    F0101.ABAC02, F0101.ABAC03, F0101.ABAC04, F0101.ABAC05, F0101.ABAC06, F0101.ABAC07, F0101.ABAC08, F0101.ABAC09, F0101.ABAC10, F0101.ABAC11,
    F0101.ABAC12, F0101.ABAC13, F0101.ABAC14, F0101.ABAC15, F0101.ABAC16, F0101.ABAC17, F0101.ABAC18, F0101.ABAC19, F0101.ABAC20, F0101.ABAC21, F0101.ABAC22, F0101.ABAC23,
    F0101.ABAC24, F0101.ABAC25, F0101.ABAC26, F0101.ABAC27, F0101.ABAC28, F0101.ABAC29, F0101.ABAC30,F0101.ABUSER, F0101.ABUPMJ,F0101.ABUPMT,F0101.ABTICKER, F0101.ABEXCHG, F0101.ABDUNS,
    F0101.ABNOE,F0101.ABGROWTHR,F0101.ABYEARSTAR,F0101.ABREVRNG, D.FaxPhoneArea, d.Phonearea, D.Fax AS Fax ,D.Phone As Phone,D.WPUPMJ AS WPUPMJ,R.Email AS Email,R.Internet As Internet,R.EAupmj As EAUPMJ,F0111.WWAN8,F0111.WWIDLN,
    F0111.WWSLNM,F0111.WWGNNM,F0111.WWMDNM,F0111.WWSRNM,F0111.WWUSER,F0111.WWUPMJ,F0111.WWUPMT,F0111.WWNTYP,F0111.WWNICK,F0111.WWPCM,F0116.ALAN8,
    F0116.ALEFTB,F0116.ALADD1,F0116.ALADD2,F0116.ALADD3,F0116.ALADD4, F0116.ALADDZ, F0116.ALCTY1,F0116.ALADDS,F0116.ALCTR, F0116.ALUPMJ,F0116.ALUPMT,F03012.AIAN8, F03012.AICO,F03012.AIMCUR,F03012.AICRCD,F03012.AIACL,
    F03012.AIARPY,F03012.AIDB,F03012.AICRCA,F03012.AIASTY,F03012.AISPYE,F03012.AIOPY,F03012.AIPOPN,F03012.AIDAOJ,F03012.AIAN8R,F03012.AICPGP,F03012.AIFRTH,
    F03012.AIMAN8,F03012.AIUPMJ,F03012.AIUPMT, F03012.AICUSTS,F03012.AITERRID, F03012.AIDTEE, F0401.A6AN8, F0401.A6MCUP, F0401.A6CRRP,F0401.A6CRCA, F0401.A6AN8R,F0401.A6CPGP, F0401.A6FRTH, F0401.A6UPMJ,F0401.A6UPMT, CAST(F0101.ABAC03 AS CHAR(10)) AS FLEX_ATTRIB_1_CHAR,
    CAST(F0101.ABAC23 AS CHAR(10)) AS FLEX_ATTRIB_2_CHAR,
    CAST(F0101.ABAC05 AS CHAR(10)) AS FLEX_ATTRIB_3_CHAR,
    CAST(F0101.ABAC15 AS CHAR(10)) AS FLEX_ATTRIB_4_CHAR,
    CAST(F0101.ABAC09 AS CHAR(10)) AS FLEX_ATTRIB_5_CHAR,
    CAST(F0101.ABAC11 AS CHAR(10)) AS FLEX_ATTRIB_6_CHAR,
    CAST(F0101.ABAC19 AS CHAR(10)) AS FLEX_ATTRIB_7_CHAR,
    CAST(F0101.ABAC21 AS CHAR(10)) AS FLEX_ATTRIB_8_CHAR,
    CAST(F0101.ABAC27 AS CHAR(10)) AS FLEX_ATTRIB_9_CHAR,
    CAST(NULL AS CHAR(10)) AS FLEX_ATTRIB_10_CHAR,
    CAST(F0101.ABAC17 AS CHAR(10)) AS FLEX_ATTRIB_11_CHAR,
    CAST(F0101.ABAC06 AS CHAR(10)) AS FLEX_ATTRIB_12_CHAR,
    CAST(F0101.ABAC08 AS CHAR(10)) AS FLEX_ATTRIB_13_CHAR,
    CAST(F0101.ABAC14 AS CHAR(10)) AS FLEX_ATTRIB_14_CHAR,
    CAST(F0101.ABAC22 AS CHAR(10)) AS FLEX_ATTRIB_15_CHAR,
    CAST(F0101.ABAC28 AS CHAR(10)) AS FLEX_ATTRIB_16_CHAR,
    CAST(F0101.ABAC18 AS CHAR(10)) AS FLEX_ATTRIB_17_CHAR,
    CAST(F0101.ABAC10 AS CHAR(10)) AS FLEX_ATTRIB_18_CHAR,
    CAST(F0101.ABAC20 AS CHAR(10)) AS FLEX_ATTRIB_19_CHAR,
    CAST(NULL AS CHAR(10)) AS FLEX_ATTRIB_20_CHAR,
    CAST(F0101.ABAC30 AS CHAR(10)) AS LINE_OF_BUSINESS,
    CAST(F0101.ABAC14 AS CHAR(10)) AS REGION,
    CAST(NULL AS CHAR(10)) AS ACCNT_AHA_NUM,
    CAST(F0101.ABAC07 AS CHAR(10)) AS ACCNT_CLASS,
    CAST(F0101.ABAC11 AS CHAR(10)) AS ACCNT_HIN_NUM,
    CAST(F0101.ABAC02 AS CHAR(10)) AS ACCNT_REGION,
    CASt(F0101.ABAC08 AS CHAR(10)) AS ACCNT_VALUE,
    CAST(F0101.ABAC16 AS CHAR(10)) AS CUST_CAT_CODE, '0' AS X_CUSTOM
    from F0101
    INNER JOIN F03012 ON F0101.ABAN8 = F03012.AIAN8
    LEFT OUTER JOIN F0401 ON F0101.ABAN8 = F0401.A6AN8
    LEFT OUTER JOIN F0116 ON F0101.ABAN8 = F0116.ALAN8 AND F0101.ABEFTB = F0116.ALEFTB
    LEFT OUTER JOIN F0111 ON F0101.ABAN8 = F0111.WWAN8 AND F0111.WWIDLN =
    LEFT OUTER JOIN (select a.WPAN8 as an8,
    min(case when a.WPPHTP= and a.WPRCK7=b.MinWPRCK7 then WPAR1 end) FaxPhoneArea,
    min(case when a.WPPHTP= and a.WPRCK7=b.MinWPRCK7 then WPPH1 end) Fax,
    min(case when a.WPPHTP= and a.WPRCK7=b.MinWPRCK7 then WPPH1 end) Phone,
    min(case when a.WPPHTP= and a.WPRCK7=b.MinWPRCK7 then WPAR1 end) Phonearea,
    max(wpupmj) as WPUPMJ
    from F0115 a,
    (select WPAN8,WPPHTP ,min(WPRCK7) MinWPRCK7 from F0115
    group by WPAN8,WPPHTP
    ) b
    where a.WPAN8=b.WPAN8 and a.wpidln =0
    group by a.WPAN8)D on f0101.aban8 = D.an8
    LEFT OUTER JOIN (SELECT P.EAAN8 as an8,
    min(case when P.EAETP= and P.EARCK7=Q.MinRCK7E then EAEMAL end) Email,
    min(case when P.EAETP= and P.EARCK7=Q.MinRCK7E then EAEMAL end) Internet,Max(eaupmj) as EAupmj
    FROM F01151 P,
    (SELECT EAAN8,EAETP,MIN(EARCK7) MinRck7E from f01151
    group by eaan8,eaemal,eaetp)Q
    where
    P.EAAN8 = Q.EAAN8 and P.EAIDLN =
    GROUP BY P.EAAN8)R on f0101.aban8 = R.an8
    union
    SELECT
    F0101.ABAN8,F0101.ABALKY,F0101.ABTAX,F0101.ABALPH,F0101.ABMCU,F0101.ABSIC,F0101.ABAT1, F0101.ABTAXC, F0101.ABATP, F0101.ABATR,F0101.ABEFTB,F0101.ABAC01,
    F0101.ABAC02, F0101.ABAC03, F0101.ABAC04, F0101.ABAC05, F0101.ABAC06, F0101.ABAC07, F0101.ABAC08, F0101.ABAC09, F0101.ABAC10, F0101.ABAC11,
    F0101.ABAC12, F0101.ABAC13, F0101.ABAC14, F0101.ABAC15, F0101.ABAC16, F0101.ABAC17, F0101.ABAC18, F0101.ABAC19, F0101.ABAC20, F0101.ABAC21, F0101.ABAC22, F0101.ABAC23,
    F0101.ABAC24, F0101.ABAC25, F0101.ABAC26, F0101.ABAC27, F0101.ABAC28, F0101.ABAC29, F0101.ABAC30,F0101.ABUSER, F0101.ABUPMJ,F0101.ABUPMT,F0101.ABTICKER, F0101.ABEXCHG, F0101.ABDUNS,
    F0101.ABNOE,F0101.ABGROWTHR,F0101.ABYEARSTAR,F0101.ABREVRNG, D.FaxPhoneArea, d.Phonearea, D.Fax AS Fax ,D.Phone As Phone,D.WPUPMJ AS WPUPMJ,R.Email AS Email,R.Internet As Internet,R.EAupmj As EAUPMJ,F0111.WWAN8,F0111.WWIDLN,
    F0111.WWSLNM,F0111.WWGNNM,F0111.WWMDNM,F0111.WWSRNM,F0111.WWUSER,F0111.WWUPMJ,F0111.WWUPMT,F0111.WWNTYP,F0111.WWNICK,F0111.WWPCM,F0116.ALAN8,
    F0116.ALEFTB,F0116.ALADD1,F0116.ALADD2,F0116.ALADD3,F0116.ALADD4, F0116.ALADDZ, F0116.ALCTY1,F0116.ALADDS,F0116.ALCTR, F0116.ALUPMJ,F0116.ALUPMT,F03012.AIAN8, F03012.AICO,F03012.AIMCUR,F03012.AICRCD,F03012.AIACL,
    F03012.AIARPY,F03012.AIDB,F03012.AICRCA,F03012.AIASTY,F03012.AISPYE,F03012.AIOPY,F03012.AIPOPN,F03012.AIDAOJ,F03012.AIAN8R,F03012.AICPGP,F03012.AIFRTH,
    F03012.AIMAN8,F03012.AIUPMJ,F03012.AIUPMT, F03012.AICUSTS,F03012.AITERRID, F03012.AIDTEE, F0401.A6AN8, F0401.A6MCUP, F0401.A6CRRP,F0401.A6CRCA, F0401.A6AN8R,F0401.A6CPGP, F0401.A6FRTH, F0401.A6UPMJ,F0401.A6UPMT, CAST(F0101.ABAC03 AS CHAR(10)) AS FLEX_ATTRIB_1_CHAR,
    CAST(F0101.ABAC23 AS CHAR(10)) AS FLEX_ATTRIB_2_CHAR,
    CAST(F0101.ABAC05 AS CHAR(10)) AS FLEX_ATTRIB_3_CHAR,
    CAST(F0101.ABAC15 AS CHAR(10)) AS FLEX_ATTRIB_4_CHAR,
    CAST(F0101.ABAC09 AS CHAR(10)) AS FLEX_ATTRIB_5_CHAR,
    CAST(F0101.ABAC11 AS CHAR(10)) AS FLEX_ATTRIB_6_CHAR,
    CAST(F0101.ABAC19 AS CHAR(10)) AS FLEX_ATTRIB_7_CHAR,
    CAST(F0101.ABAC21 AS CHAR(10)) AS FLEX_ATTRIB_8_CHAR,
    CAST(F0101.ABAC27 AS CHAR(10)) AS FLEX_ATTRIB_9_CHAR,
    CAST(NULL AS CHAR(10)) AS FLEX_ATTRIB_10_CHAR,
    CAST(F0101.ABAC17 AS CHAR(10)) AS FLEX_ATTRIB_11_CHAR,
    CAST(F0101.ABAC06 AS CHAR(10)) AS FLEX_ATTRIB_12_CHAR,
    CAST(F0101.ABAC08 AS CHAR(10)) AS FLEX_ATTRIB_13_CHAR,
    CAST(F0101.ABAC14 AS CHAR(10)) AS FLEX_ATTRIB_14_CHAR,
    CAST(F0101.ABAC22 AS CHAR(10)) AS FLEX_ATTRIB_15_CHAR,
    CAST(F0101.ABAC28 AS CHAR(10)) AS FLEX_ATTRIB_16_CHAR,
    CAST(F0101.ABAC18 AS CHAR(10)) AS FLEX_ATTRIB_17_CHAR,
    CAST(F0101.ABAC10 AS CHAR(10)) AS FLEX_ATTRIB_18_CHAR,
    CAST(F0101.ABAC20 AS CHAR(10)) AS FLEX_ATTRIB_19_CHAR,
    CAST(NULL AS CHAR(10)) AS FLEX_ATTRIB_20_CHAR,
    CAST(F0101.ABAC30 AS CHAR(10)) AS LINE_OF_BUSINESS,
    CAST(F0101.ABAC14 AS CHAR(10)) AS REGION,
    CAST(NULL AS CHAR(10)) AS ACCNT_AHA_NUM,
    CAST(F0101.ABAC07 AS CHAR(10)) AS ACCNT_CLASS,
    CAST(F0101.ABAC11 AS CHAR(10)) AS ACCNT_HIN_NUM,
    CAST(F0101.ABAC02 AS CHAR(10)) AS ACCNT_REGION,
    CASt(F0101.ABAC08 AS CHAR(10)) AS ACCNT_VALUE,
    CAST(F0101.ABAC16 AS CHAR(10)) AS CUST_CAT_CODE, '0' AS X_CUSTOM
    from F0101
    LEFT OUTER JOIN F03012 ON F0101.ABAN8 = F03012.AIAN8
    INNER JOIN F0401 ON F0101.ABAN8 = F0401.A6AN8
    LEFT OUTER JOIN F0116 ON F0101.ABAN8 = F0116.ALAN8 AND F0101.ABEFTB = F0116.ALEFTB
    LEFT OUTER JOIN F0111 ON F0101.ABAN8 = F0111.WWAN8 AND F0111.WWIDLN =
    LEFT OUTER JOIN (select a.WPAN8 as an8,
    min(case when a.WPPHTP= and a.WPRCK7=b.MinWPRCK7 then WPAR1 end) FaxPhoneArea,
    min(case when a.WPPHTP= and a.WPRCK7=b.MinWPRCK7 then WPPH1 end) Fax,
    min(case when a.WPPHTP= and a.WPRCK7=b.MinWPRCK7 then WPPH1 end) Phone,
    min(case when a.WPPHTP= and a.WPRCK7=b.MinWPRCK7 then WPAR1 end) Phonearea,
    max(wpupmj) as WPUPMJ
    from F0115 a,
    (select WPAN8,WPPHTP ,min(WPRCK7) MinWPRCK7 from F0115
    group by WPAN8,WPPHTP
    ) b
    where a.WPAN8=b.WPAN8 and a.wpidln =0
    group by a.WPAN8)D on f0101.aban8 = D.an8
    LEFT OUTER JOIN (SELECT P.EAAN8 as an8,
    min(case when P.EAETP= and P.EARCK7=Q.MinRCK7E then EAEMAL end) Email,
    min(case when P.EAETP= and P.EARCK7=Q.MinRCK7E then EAEMAL end) Internet,Max(eaupmj) as EAupmj
    FROM F01151 P,
    (SELECT EAAN8,EAETP,MIN(EARCK7) MinRck7E from f01151
    group by eaan8,eaemal,eaetp)Q
    where
    P.EAAN8 = Q.EAAN8 and P.EAIDLN =
    GROUP BY P.EAAN8)R on f0101.aban8 = R.an8
    Oracle Fatal Error
    Database driver error...
    Function Name : Execute
    *****************************************************

    "ORA-00933: SQL command not properly ended"
    this error may be seen due to reasons like the Informatica properties are not set correct.
    Are all the informatica properties set correct? how many ETL jobs completed, what analytic apps are in the ETL process?

  • SQL command not properly ended

    I am writting a procedure, I declare a cursor, the code like:
    CREATE or replace procedure printloanbooklist(cardno in integer) as
    cursor cur_loanbooklist is
    select book_loans.book_id bookid,
    title ,
    date_due,
    book_loans.branch_id branchid,
    author_name
    from books, book_loans, BOOK_AUTHORS
    where books.book_id = book_loans.book_id and
    book_authors.book_id = book_loans.book_id and
    card_no = cardno
    group by date_due desc;
    c_rec cur_loanbooklist%rowtype;
    it gave me:
    Warning: Procedure created with compilation errors.
    SQL> show errors
    Errors for PROCEDURE PRINTLOANBOOKLIST:
    LINE/COL ERROR
    4/5 PL/SQL: SQL Statement ignored
    13/23 PL/SQL: ORA-00933: SQL command not properly ended
    26/27 PLS-00103: Encountered the symbol "BARCODE" when expecting one of
    the following:
    . ( ) , * @ % & | = - + < / > at in is mod not rem => ..
    <an exponent (**)> <> or != or ~= >= <= <> and or like as
    between from using ||
    I can not tell the problem of cursor, please help and thanks!

    You are right, Thanks. After I delete desc, it works. But the 'BORCODE' problem still there, the rest code like:
    16 begin
    17 if not cur_loanbooklist%isopen then
    18 open cur_loanbooklist;
    19 end if;
    20
    21 fetch cur_loanbooklist into c_rec;
    22 while cur_loanbook%found loop
    23 dbms_output.put_line(c_rec.branchid ||' ' ||sysdate);
    24 dbms_output.put_line('Item(s) checked out to '||cardno);
    25 dbms_output.put_line('TITLE: '||c_rec.title ||''/'||c_rec.author_name);
    26 dbms_output.put_line('BARCODE: '||c_rec.bookid);
    27 dbms_output.put_line('DUE DATE: '||c_rec.date_due);
    28 fetch cur_loanbooklist into c_rec;
    29 end loop;
    30 close cur_loanbooklist;
    31 end;
    32 /
    Warning: Procedure created with compilation errors.
    SQL> show errors
    Errors for PROCEDURE PRINTLOANBOOKLIST:
    LINE/COL ERROR
    26/27 PLS-00103: Encountered the symbol "BARCODE" when expecting one of
    the following:
    . ( ) , * @ % & | = - + < / > at in is mod not rem => ..
    <an exponent (**)> <> or != or ~= >= <= <> and or like as
    between from using ||
    Please help and have good thanksgiving!

  • Sql command not properly ended at oci call oci stmtexecute

    Hi ,
    Iam new to OBI Apps, i have my DB,OBIEE 11g,Informatica, DAC instance installed in linux 64 bit and OBI Apps, Informatica, Dac clients in windows7 32 bit
    When i run DAC full load all the tasks show Success.
    In RPD when i select database in physical layer it is not showing any rows, when i try right click and select update row count
    [nqsError: 17001] Oracle Error Code: 933, message: ORA-00933: SQL Command not properly ended at OCI call OCIStmtExecute.[nqsError: 17010] SQL Statament Perparation failed.
    and als in answers iam facing same problem
    In Answers iam using EBS pre defined dashboards
    Unable to see the data in dashboards it is throwing error
    [nqsError: 17001] Oracle Error Code: 933, message: ORA-00933: SQL Command not properly ended at OCI call OCIStmtExecute.[nqsError: 17010] SQL Statament Perparation failed.
    I dont know where i had done mistake.
    can any one help in this regard \
    plzzzzzzzzzz

    Hi,
    Thanq for ur reply
    In EBS connection pool i have given at connection script-> execute on contact
    "call /* valueof(NQ_SESSION.ACF) */ APP_SESSION.validate_icx_session('valueof(NQ_SESSION.ICX_SESSION_COOKIE)')"
    can u let me know is it correct.
    And one more doubt
    in client machine i have 2 RPDs in repository
    1. OracleBIAnalyticApps.rpd and
    2. EnterpriseBusinessAnalytics.rpd
    i had uploaded OracleBIAnalytics.rpd in EM and below that i haven the path for catlog/EnterpriseBusinessAnalytics.rpd
    is it correct i have to upload EnterpriseBusinessAnalytics.rpd only

  • Hi..."PL/SQL: ORA-00933: SQL command not properly ended"

    Error starting at line 1 in command:
    DECLARE
    V_ENAME EMP.ENAME%TYPE;
    V_SAL EMP.SAL%TYPE;
    V_RANK INTEGER(2);
    BEGIN
    V_RANK:=&RN;
    select ENAME,SAL,RNK from (select ENAME,SAL,dense_rank() over(order by sal desc) AS RNK from emp)
    into V_ENAME,V_SAL,V_RANK from emp where RNK=V_RANK;
    DOPL('EMPLOYEE NAME:'||V_ENAME);
    DOPL('EMPLOYEE SAL:'||V_SAL);
    DOPL('EMPLOYEE RANK:'||V_RNK);
    END;
    Error report:
    ORA-06550: line 7, column 99:
    PL/SQL: ORA-00933: SQL command not properly ended
    ORA-06550: line 7, column 1:
    PL/SQL: SQL Statement ignored
    06550. 00000 - "line %s, column %s:\n%s"
    *Cause:    Usually a PL/SQL compilation error.
    *Action:
    hi..,when i executing above pl/sql program, it shows error...!
    so i am unable to find error correctly..! plz help me..!
    Regards..!
    Cnu.

    Your SELECT syntax is messed up. The INTO should follow the SELECT. Is this what you are trying to do:
    DECLARE
      V_ENAME     EMP.ENAME%TYPE;
      V_SAL       EMP.SAL%TYPE;
      V_RANK      INTEGER (2);
    BEGIN
      V_RANK := &RN;
      select ENAME,
             SAL,
             RNK
        into V_ENAME,
             V_SAL,
             V_RANK
        from (select ENAME,
                     SAL,
                     dense_rank () over (order by sal desc) AS RNK
                from emp),
             emp
       where RNK = V_RANK;
      DOPL ('EMPLOYEE NAME:' || V_ENAME);
      DOPL ('EMPLOYEE SAL:' || V_SAL);
      DOPL ('EMPLOYEE RANK:' || V_RNK);
    END;By the way, looking at some of your past entries it looks like you have a bad habit of opening a request then never responding to it. You really should mark a entry as closed once it is no longer an issue. Also, if you mark helpful hints and helpful and correct hints as correct it makes people that help you happy and they are more likely going to help you again in the future... just saying.

  • ORA-00933: SQL command not properly ended: error in TRIGGER

    Hi ,
    I tried the following example trigger but unable to trace the error..
    Could you please find it...
    CREATE OR REPLACE TRIGGER trig1
    AFTER INSERT OR UPDATE OR DELETE
    OF RLID,RL
    ON X_RLM_T
    REFERENCING NEW AS NEW OLD AS OLD
    FOR EACH ROW
    DECLARE
    rlmId X_RLM_T.RLID%TYPE:=CASE WHEN INSERTING OR UPDATING THEN :NEW.RLID WHEN DELETING THEN :OLD.RLID ELSE NULL END;
    rlm RX_RLM_T.RL%TYPE:=CASE WHEN INSERTING OR UPDATING THEN :NEW.RL WHEN DELETING THEN :OLD.RL ELSE NULL END;
    var number:=0;
    var1 number:=0;
    BEGIN
    var:=1;
    var1:=1;
    INSERT ALL
    WHEN var=1 then
    INTO LM_D(CL_ID,D_RLM,RM_NM,RDK_ORG)
    VALUES(dclid,D_RLM,RM_NM,RDK_ORG)
    WHEN var1=1 then
    INTO LM_D(CL_ID,D_RLM,RM_NM,RDK_ORG)
    VALUES(pclid,D_RLM,RM_NM,RDK_ORG)
    SELECT X_RLM_DK_MAP_T.CL_ID AS dclid,
        PM_OR_T_VP.ORG_TECH_ID AS pclid,
        rlmId as D_RLM,
        rlm as RM_NM,
        RX_RLM_DK_MAP_T.ORG_TECH_ID as RDK_ORG
    FROM  RX_RLM_DK_MAP_T , PM_OR_T PMN_ORG_T_VP, PM_OR_T PMN_ORG_T_HP
           PM_RA_MST
    WHERE rlmId = RX_RLM_DK_MAP_T.RL_ID and
    RX_RLM_DK_MAP_T.ORG_TECH_ID=PM_OR_T_HP.ORG_TECH_ID and
    PM_OR_T_HP.ORG_ID=PM_RA_MST.HPMN_ID and     
    PM_RA_MST.VPMN_ID=PM_OR_T_VP.ORG_ID;
    end;error:
    11/2 PL/SQL: SQL Statement ignored
    24/8 PL/SQL: ORA-00933: SQL command not properly ended
    please help me in this...

    i GOT THE ERROR...

  • Procedure compilation failed with SQL command not properly ended error

    Hi All,
    Kindly help me to fix this.
    I am compiling a procedure and getting an error. Procedure and error details are as follows:
    Procedure:
    CREATE or REPLACE PROCEDURE jiostore_new.auditReportCount (u_name IN VARCHAR2,stdate IN DATE,eddate IN DATE)
    IS
    BEGIN
    DECLARE Total Number;
    BEGIN
    SELECT COUNT(am.id) into Total FROM auditMaster_ AS am  INNER JOIN jioworld.deviceos_ dvos ON dvos.id=am.deviceOs WHERE am.updatedBy=u_name or am.updatedBy=ALL AND DATE(am.updatedDate)>=stdate OR DATE(am.updatedDate)='0000-00-00' AND DATE(am.updatedDate)<=eddate or DATE(am.updatedDate)='0000-00-00';
    dbms_output.put_line('Total Count:' || Total);
    END;
    END;
    Error:
    Error(6,1): PL/SQL: SQL Statement ignored
    Error(6,50): PL/SQL: ORA-00933: SQL command not properly ended
    Regards,
    Vishal G

    2922723 wrote:
    Hi All,
    Kindly help me to fix this.
    I am compiling a procedure and getting an error. Procedure and error details are as follows:
    Procedure:
    CREATE or REPLACE PROCEDURE jiostore_new.auditReportCount (u_name IN VARCHAR2,stdate IN DATE,eddate IN DATE)
    IS
    BEGIN
    DECLARE Total Number;
    BEGIN
    SELECT COUNT(am.id) into Total FROM auditMaster_ AS am  INNER JOIN jioworld.deviceos_ dvos ON dvos.id=am.deviceOs WHERE am.updatedBy=u_name or am.updatedBy=ALL AND DATE(am.updatedDate)>=stdate OR DATE(am.updatedDate)='0000-00-00' AND DATE(am.updatedDate)<=eddate or DATE(am.updatedDate)='0000-00-00';
    dbms_output.put_line('Total Count:' || Total);
    END;
    END;
    Error:
    Error(6,1): PL/SQL: SQL Statement ignored
    Error(6,50): PL/SQL: ORA-00933: SQL command not properly ended
    Regards,
    Vishal G
    The first thing, is that for your own sanity you should learn to format your code for readability.  And for the sanity of those from whom you seek help, you should learn to preserve that formatting when you post to a forum:
    CREATE OR REPLACE PROCEDURE jiostore_new.auditReportCount(
        u_name IN VARCHAR2,
        stdate IN DATE,
        eddate IN DATE)
    IS
    BEGIN
      DECLARE
        Total NUMBER;
      BEGIN
        SELECT COUNT(am.id)
        INTO Total
        FROM auditMaster_ AS am
        INNER JOIN jioworld.deviceos_ dvos
        ON dvos.id              =am.deviceOs
        WHERE am.updatedBy      =u_name
        OR am.updatedBy          =ALL
        AND DATE(am.updatedDate)>=stdate
        OR  DATE(am.updatedDate) ='0000-00-00'
        AND DATE(am.updatedDate)<=eddate
        OR  DATE(am.updatedDate) ='0000-00-00';
        dbms_output.put_line('Total Count:' || Total);
      END;
    END;
    What is the data type of am.updateDate?  It appears to be a varchar being passed to a function named DATE to convert it to a DATEfor comparison to your input parameters,  But you also compare it to strings. 
    Where are the variables 'u_name' and 'ALL'?  (and what kind of a name is that for a variable -- 'ALL'?)

  • Problems passing timestamp variable to block-SQL command not properly ended

    Can you please help me answer or direct me to resources in answering the following.
    I'm attempting to pass a timestamp variable to a block but am getting errors with every method I've tried yet.
    The example below is attempting to generate a list of all sales dates for orders after the 21st of March 2000.
    DECLARE
    BeginDate Orders.PurchaseDate%TYPE :=to_date('21-3-2000', 'dd-mm-yyyy');
    Target Orders.PurchaseDate%TYPE;
    BEGIN
    DBMS_OUTPUT.PUT_LINE(to_char(BeginDate));
    SELECT Distinct PurchaseDate from Orders into Target WHERE PurchaseDate>BeginDate;
    END;
    When running it - it returns
    ORA-00933: SQL command not properly ended ORA-06512: at line 8Please advise

    -- I"m still trying to get a timestamp into an execute immediate statement.
    Declare
    BeginDate Orders.PurchaseDate%TYPE :=to_date('21-3-2000', 'dd-mm-yyyy');
    var_date Orders.PurchaseDate%TYPE ;
    BEGIN
    DBMS_OUTPUT.PUT_LINE(to_char(BeginDate,'DD.MM.YYYY'));
    sql1 = 'SELECT MAX(PurchaseDate) INTO Target from Orders WHERE PurchaseDate> :var_date';
    Execute Immediate sql1 Using BeginDate;
    DBMS_OUTPUT.PUT_LINE(to_char(Target,'DD.MM.YYYY'));
    END;
    Thanks again for the replies, I'm still not there yet even after re-reading the documentation that applies to this,
    Using what follows below the Execute Immediate line/syntax is the problematic part of this...
    to quote the block line still returning errors.
    This line which would seem natural...
    Execute Immediate sql1 Using BeginDate;returns -- missing keyword
    Modified with this line attempts to pass another variable to the block also errors.
    Execute Immediate sql1 Using BeginDate, var_date;returns -- ORA-01006: bind variable does not exist
    Perhaps I'm not getting some key concept here, but I would think passing a variable into execute immediate would be
    as simple as passing a string or int into a *.bat,*.sh file or function/procedure in any other language.
    And/or I'm missing a key element or understanding to how this syntax should work.
    Thank you very much for your previous replies any other ideas welcome.

  • ORA-00933: SQL command not properly ended

    I am attempting to create a view in oracle 8.0.6 but get the error message ORA-00933 SQL command not properly ended, can anyone help?:
    SQL> create view AJT_SCHEDULES01 as
    2 select SCHDL_REFNO, STRAN_REFNO from SCHEDULES order by STRAN_REFNO desc;
    select SCHDL_REFNO, STRAN_REFNO from SCHEDULES order by STRAN_REFNO desc
    ERROR at line 2:
    ORA-00933: SQL command not properly ended

    ORDER BY cannot be used to create an ordered view or to insert in a certain order.
    Please refer to Section ORA-00933: SQL command not properly ended at : http://otn.oracle.com/doc/server.805/a58312/newch220.htm
    For further assistance, please post in the forum at : PL/SQL
    Hope this helps
    Regards
    Pushkala

  • Sql Exception : Sql command not properly ended

    Hi,
    I have the following piece of code which i am using to search into the database and display the result in my jsp page. But it is throwing this exception. This happens only when i give 2 conditions. If i try to search with only one parameter, it works fine and returns the result. But when i enable two parameters , it throws the exception.
    Below is the code i have written.
    <%@ page language="java" contentType="text/html; charset=ISO-8859-1"
        pageEncoding="ISO-8859-1"%>
    <%@page import="java.sql.*"%>
    <!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
    <html>
    <head>
    <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
    <title>Insert title here</title>
    </head>
    <body>
    <%  
            String queryString=null;
            String Part_Number=null;
                String Revision_Id=null;     
                String Part_Desc=null;     
                String Keyword_Name=null;
                String Design_Style=null;     
                String Configuration_Name=null;
                String Charateristic_Name=null;
             String pN=null;
            String rI=null;
            String pD=null;
            String kN=null;
            String dS=null;
            String coN=null;
            String chN=null;
             queryString ="select * from PART";
             Connection con=null;
               Statement pst=null;
               ResultSet rs=null;
               Part_Number =request.getParameter("part_nbr");
              Revision_Id=request.getParameter("rev_id");
               Part_Desc=request.getParameter("part_desc");
               Keyword_Name=request.getParameter("keyword_name");     
               Design_Style=request.getParameter("Design_style");
               Configuration_Name=request.getParameter("configuration");
               Charateristic_Name=request.getParameter("characteristic");
                pN=Part_Number.trim();
                rI=Revision_Id.trim();
                pD=Part_Desc.trim();
                kN=Keyword_Name.trim();
                dS=Design_Style.trim();
                coN=Configuration_Name.trim();
                chN=Charateristic_Name.trim();
              System.out.println("Part Number In success: "+pN);
              System.out.println("Rev Number In serchsuccess: "+rI);
              System.out.println("part desc In seachsuccess: "+pD);
              System.out.println("Keyword In sesuccess: "+kN);
              System.out.println("Design style In sesuccess: "+dS);
              System.out.println("Config In sesuccess: "+coN);
              System.out.println("charac In sesuccess: "+chN);
              System.out.println("queryString in sesuccess: "+queryString);
               if(rI!=null)     
                   queryString = queryString+" where REV_ID= '"+rI+"'";
               if(pD!=null)     
                   queryString = queryString+" where OBJ_DESC= '"+pD+"'";
               System.out.println("queryString in sesuccess: "+queryString);
              try
                   DriverManager.registerDriver(new oracle.jdbc.driver.OracleDriver());
                    System.out.println("driver manager");
                con=DriverManager.getConnection("jdbc:oracle:thin:@172.18.93.53:1521:PDMDumm", "Dumm1", "satyam");
                System.out.println("connection established");
                 pst = con.createStatement();
                rs = pst.executeQuery(queryString);
                System.out.println("Query executed");
              catch(SQLException se)
                System.out.println("database error2");
                se.printStackTrace();
              catch(Exception e)
                   System.out.println("error");
            if(rs!=null)
            %>
          <table>
              <tr>
                <th> PartNumber
                <th> Revision_Id
                <th> Description
                <th> Characteristic
                <th> Configuration
                <th> DesignStyle
                <th> Keyword
                  <th> Planned Eff In Dte
                  <th> Infos
                  <th> Native File
           </table>     
       <tr>         
        <%       
                   while(rs.next())
                      %>
            <td> <%=rs.getString(1) %>          
            <td> <%=rs.getString(2) %>          
            <td> <%=rs.getString(3) %>          
            <td> <%=rs.getString(4) %>
            <td> <%=rs.getString(5) %>
            <td> <%=rs.getString(6) %>
            <td> <%=rs.getString(7) %>     
            <td> <%=rs.getString(8) %>     
            <td> <%=rs.getString(9) %>     
            <td> <%=rs.getString(10) %>     
          <%             
            %>
    </body>
    </html>And this is the exception i get.
    Part Number In success:
    Rev Number In serchsuccess:
    part desc In seachsuccess: cat
    Keyword In sesuccess: ----
    Design style In sesuccess: ----
    Config In sesuccess: ----
    charac In sesuccess: ----
    queryString in sesuccess: select * from PART
    queryString in sesuccess: select * from PART where REV_ID= '' where OBJ_DESC= 'cat'
    driver manager
    connection established
    database error2
    java.sql.SQLException: ORA-00933: SQL command not properly ended
         at oracle.jdbc.dbaccess.DBError.throwSqlException(DBError.java)
         at oracle.jdbc.ttc7.TTIoer.processError(TTIoer.java)
         at oracle.jdbc.ttc7.Oall7.receive(Oall7.java)
         at oracle.jdbc.ttc7.TTC7Protocol.doOall7(TTC7Protocol.java)
         at oracle.jdbc.ttc7.TTC7Protocol.parseExecuteDescribe(TTC7Protocol.java)
         at oracle.jdbc.driver.OracleStatement.doExecuteQuery(OracleStatement.java)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java)
         at oracle.jdbc.driver.OracleStatement.executeQuery(OracleStatement.java)
         at org.apache.jsp.searchsuccess_jsp._jspService(searchsuccess_jsp.java:129)
         at org.apache.jasper.runtime.HttpJspBase.service(HttpJspBase.java:97)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:332)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:314)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:264)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.ApplicationDispatcher.invoke(ApplicationDispatcher.java:672)
         at org.apache.catalina.core.ApplicationDispatcher.processRequest(ApplicationDispatcher.java:463)
         at org.apache.catalina.core.ApplicationDispatcher.doForward(ApplicationDispatcher.java:398)
         at org.apache.catalina.core.ApplicationDispatcher.forward(ApplicationDispatcher.java:301)
         at SearchKdcc.doPost(SearchKdcc.java:60)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:709)
         at javax.servlet.http.HttpServlet.service(HttpServlet.java:802)
         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:869)
         at org.apache.coyote.http11.Http11BaseProtocol$Http11ConnectionHandler.processConnection(Http11BaseProtocol.java:664)
         at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
         at org.apache.tomcat.util.net.LeaderFollowerWorkerThread.runIt(LeaderFollowerWorkerThread.java:80)
         at org.apache.tomcat.util.threads.ThreadPool$ControlRunnable.run(ThreadPool.java:684)
         at java.lang.Thread.run(Thread.java:619)

    Hi drvijayy2k2 ,
    Thanks for replying.
    I used your code in my application and this is the problem i am facing now. The query is getting executed but its not taking the value from the database because of the Null Rev Id that is getting inputted into queryString. I have given only part_desc as the search criteria. If i just search using part description , commenting the rev_id part , i am able to retrieve the result from the database.
    I have to code in a way using which i can search using either rev_id or part_desc , or using both at the same time.
    Part Number In success:
    Rev Number In serchsuccess:
    part desc In seachsuccess: cat
    Keyword In sesuccess: ----
    Design style In sesuccess: ----
    Config In sesuccess: ----
    charac In sesuccess: ----
    queryString in sesuccess: select * from PART
    queryString in sesuccess: select * from PART where REV_ID= '' and OBJ_DESC= 'cat'
    driver manager
    connection established
    Query executed

  • SQL Command not properly ended at line 13

    Dear All,
    I have a below code to find a value from database. but when iam running this code it is throwing error "SQL Command not properly ended at line 13"
    iam unable to find the error.
    Pls help me.
    DECLARE
    match_count INTEGER;
    -- Type the owner/schema of the tables you are looking at
    v_owner VARCHAR2(255) :='SCOTT';
    -- Type the data type you are look at (in CAPITAL)
    -- VARCHAR2, NUMBER, etc.
    v_data_type VARCHAR2(255) :='VARCHAR2';
    -- Type the string you are looking at
    v_search_string VARCHAR2(255) :='KING';
    BEGIN
    FOR t IN (SELECT table_name, column_name FROM all_tab_cols where owner=v_owner and data_type = v_data_type)
    LOOP
    EXECUTE IMMEDIATE
    'SELECT COUNT(*) FROM '||v_owner||'.'||t.table_name||' WHERE '||t.column_name||' = :1'
    INTO match_count
    USING v_search_string;
    IF match_count > 0 THEN
    dbms_output.put_line( t.table_name ||' '||t.column_name||' '||match_count );
    END IF;
    END LOOP;
    END;
    Thanx..

    DECLARE
       match_count       INTEGER;
    -- Type the owner/schema of the tables you are looking at
       v_owner           VARCHAR2 (255) := 'SCOTT';
    -- Type the data type you are look at (in CAPITAL)
    -- VARCHAR2, NUMBER, etc.
       v_data_type       VARCHAR2 (255) := 'VARCHAR2';
    -- Type the string you are looking at
       v_search_string   VARCHAR2 (255) := 'KING';
    BEGIN
       FOR t IN (SELECT table_name, column_name
                   FROM all_tab_cols
                  WHERE owner = v_owner AND data_type = v_data_type)
       LOOP
          EXECUTE IMMEDIATE    'SELECT COUNT(*) FROM '
                            || v_owner
                            || '.'
                            || t.table_name
                            || ' WHERE '
                            || t.column_name
                            || ' = :1'
                       INTO match_count
                      USING v_search_string;
          IF match_count > 0
          THEN
             DBMS_OUTPUT.put_line (   t.table_name
                                   || ' '
                                   || t.column_name
                                   || ' '
                                   || match_count
          END IF;
       END LOOP;
    END;Checked and no issues in Toad too...

  • Xml query error. ORA-00933: SQL command not properly ended

    Hi all,
    My Database Version: Oracle Database 10g Enterprise Edition Release 10.1.0.2.0.
    CREATE table test (Name varchar2(3), Id number);
    insert into test values ('abc', 61);
    insert into test values ('def', 46);
    select table_name,
    column_name,
    'abc' search_string,
    result
    from cols,xmltable(('ora:view("'||table_name||'")/ROW/'||column_name||'[ora:contains(text(),"%'|| 'abc' || '%") > 0]')
    columns result varchar2(10) path '.'
    where table_name in ('TEST');
    and i get: ORA-00933: SQL command not properly ended it points over '*xmltable*'

    ok, its possible to get output from a xml like this.
    i need output like this,
    customerid CustomerName Country
    1 xxxx 4
    2 yyyy 5
    xml:
    <Customer>
    <CustomerInformation>
              <Customerid>1</Customerid>
              <CustomerName>xxxx</CustomerName>
              <Country>4</Country>
         </CustomerInformation>
    <CustomerInformation>
              <Customerid>2</Customerid>
              <CustomerName>yyyy</CustomerName>
              <Country>5</Country>
         </CustomerInformation>
    </Customer>
    This xml is input to my stored procedure, i need to insert the xml tag values into customner_table.
    For this i insert the xml inro a xml_document_table having a xmltype column.
    after , by using the below mentioned query to select xml_tag values from that column.
    when i execute this query
    INSERT into customer_table(customer_id)
    SELECT X.XML_DOCUMENT.extract('/Customer/commodityInfo/CustomerInformation/Customerid/text()').getStringVal() "Customerid" from XML_DOCUMENT_TABLE X;
    i got output in a single row.
    customerid_
    1 <next line> 2
    But i need output like this,
    Customerid_
    1
    2
    im struggling with this simple insert. pls share ur idea.....
    Edited by: 887268 on Apr 4, 2012 10:04 PM
    Edited by: 887268 on Apr 4, 2012 10:17 PM

  • ORA-00933 SQL Comand not properly ended

    Hi,
    While running SQL * Plus report,I am getting the Error.ORA-00933 SQL Command not properly ended.
    Please advise

    Hi,
    This is the query.I want to run the report for 2 different org_ids.Each Org_id runs individually and it shoul be resticted only one org_id for a particular user.The user is resticted only his particular org_id.
    I am getting the same error.
    Please advise and Help me
    SELECT org_id
    , ctype
    , invoice_day inv_date
    , ROUND (TRUNC (SYSDATE) - invoice_date, 0) days_from_inv_date
    , CASE
    WHEN ROUND (TRUNC (SYSDATE) - invoice_date, 0) <= 0
    THEN 'Current'
    WHEN ROUND (TRUNC (SYSDATE) - invoice_date, 0) BETWEEN 1 AND 30
    THEN '1 - 30'
    WHEN ROUND (TRUNC (SYSDATE) - invoice_date, 0) BETWEEN 31 AND 60
    THEN '31 - 60'
    WHEN ROUND (TRUNC (SYSDATE) - invoice_date, 0) BETWEEN 61 AND 90
    THEN '61 - 90'
    WHEN ROUND (TRUNC (SYSDATE) - invoice_date, 0) > 90
    THEN '> 90'
    END inv_date_bucket
    , COUNT (DISTINCT invoice_number) num_invoices
    , SUM (amt_due_orig) total_amt_invoiced
    , SUM (amt_due_remain) total_amt_remain
    , ROUND ((SUM (amt_due_remain) / SUM (amt_due_orig)) * 100, 0) "%_DUE"
    FROM (SELECT rcta.org_id
    , TRUNC (rcta.printing_original_date) printing_date
    , hp.party_name customer_name
    , hca.account_number customer_number
    , hcsua.attribute1 ctype
    , hcsua.attribute2 ctype1
    , hcsua.attribute3 branch_agent_id
    , rcta.trx_date invoice_date
    , TO_CHAR (rcta.trx_date, 'DD-MON-YYYY - Day') invoice_day
    , rcta.trx_number invoice_number
    , apsa.amount_due_original amt_due_orig
    , apsa.amount_due_remaining amt_due_remain
    , (apsa.amount_due_original - apsa.amount_due_remaining)
    amt_paid
    , rcta.purchase_order
    , apsa.due_date
    FROM apps.ra_customer_trx_all rcta
    , apps.ar_payment_schedules_all apsa
    , apps.hz_parties hp
    , apps.hz_cust_accounts hca
    , apps.hz_cust_site_uses_all hcsua
    WHERE 1 = 1
    AND rcta.customer_trx_id = apsa.customer_trx_id
    AND apsa.CLASS = 'INV'
    AND rcta.bill_to_customer_id = hca.cust_account_id
    -------- AND rcta.org_id = :org_id
    AND hca.party_id = hp.party_id
    AND rcta.bill_to_site_use_id = hcsua.site_use_id
    AND rcta.trx_date >= SYSDATE - 180
    AND rcta.trx_date < SYSDATE + 1)
    GROUP BY org_id
    , ctype
    , invoice_day
    , invoice_date
    ORDER BY 1
    , 2
    , 4

Maybe you are looking for

  • Why isn't my iPhone 5c working to it's full potential?

    I am currently using iOS 8.1.1 on my iPhone 5c. I have had the phone since last Christmas (December 2013) so it is almost a year old. In the last few weeks, I have been having some issues with my iPhone that I know should not be an issue on a fairly

  • I want to print multiple Material no against Purchase Order

    hi i want to display MATNR against Purchase Order suppose 10 Material no is there than i want to display 10 material no against that Purchase order. thanks. laxman sankhla.

  • Facial Recognition-- Best Practice

    Question about facial recognition for tagging, Lets say you have a person who has baby pictures, child pictures, teenager, and adult pictures. should you tell PE that these are different people (john infant, john child, john teenager, john adult) to

  • IPhoto Rotations Annoyingly Revert in iMovie

    Others have complained that despite having the latest iPhoto update, photos taken in portrait mode (which appear sideways when imported), and rotated in iPhoto, revert to the sideways view in the iMovie Photos pane. Having tested this with a newly-ta

  • Updating list output during execution.

    Hi, Is it possible to somehow update report list output during code execution ? What I'm trying to do is to LOOP at all files in a certain directory, process them and return some output. The process is time consuming. So I'd like the user not to wait