ORA-00933 with an update

Hi everyone,
I am getting an ORA-00933 error while executing this code :
UPDATE type_composant
set  nom='RE',
libelle='Réglementaire',
process_export='YIYZD',
lien='0',
lien_technique='0',
lien_reglementaire='1',
lien_squelette='0',
lien_demande='0',
lien_pj='0',
id_type_comp_rattach=null,
id_type_comp_grp=null,
imp_comp=0,
imp_lien=0,
is_spec=1,
imp_sque=0,
spec_table='reglementaire',
spec_req='SELECT A.CDREGL AS CDREGL,
A.CDSTCO AS REPERTOIRE,
C.LILONG AS LIB_REP,
A.CDCODE AS CODE,
B.LIBLON AS LIB_CODE
FROM HR.ZD00 A,
HR.ZD01 B,
HR.DI31 C
WHERE A.NUDOSS = B.NUDOSS
AND A.CDSTCO = C.VACDST
AND C.CDLANG = 'F'
AND B.CDLANG = 'F'
AND CDSTCO  IN ('DS9','UPA','WS0','UGQ','UHU','DSJ','WF0','DRX','G01','DS3',
'GCP','UAA','G02','G00','DRH','DRB','WAA','DRE','WR2','DRC','DRJ','GPR','DRM',
'WA0','GCO','UIG','UIQ','DRF','WG2','XXX','UCB')',
comp_web='0'
where id_type_comp='36';And here is the error I got :
AND C.CDLANG = 'F'
ERROR at line 28:
ORA-00933: SQL command not properly endedI don't know if it comes from the SELECT, and I think the syntax is good.
Any help would be nice !
Guich
Edited by: Guich on May 11, 2011 11:04 AM
Edited by: Guich on May 11, 2011 11:04 AM

And with tabs, it would be much readable :
UPDATE type_composant
set  nom='RE',
     libelle='Réglementaire',
     process_export='YIYZD',
     lien='0',
     lien_technique='0',
     lien_reglementaire='1',
     lien_squelette='0',
     lien_demande='0',
     lien_pj='0',
     id_type_comp_rattach=null,
     id_type_comp_grp=null,
     imp_comp=0,
     imp_lien=0,
     is_spec=1,
     imp_sque=0,
     spec_table='reglementaire',
     spec_req='SELECT A.CDREGL AS CDREGL,
                      A.CDSTCO AS REPERTOIRE,
                      C.LILONG AS LIB_REP,
                      A.CDCODE AS CODE,
                      B.LIBLON AS LIB_CODE
               FROM HR.ZD00 A,
                      HR.ZD01 B,
                      HR.DI31 C
               WHERE A.NUDOSS = B.NUDOSS
               AND A.CDSTCO = C.VACDST
               AND C.CDLANG = 'F'
               AND B.CDLANG = 'F'
               AND CDSTCO  IN ('DS9','UPA','WS0','UGQ','UHU','DSJ','WF0','DRX','G01','DS3',
                               'GCP','UAA','G02','G00','DRH','DRB','WAA','DRE','WR2','DRC','DRJ','GPR','DRM',
                               'WA0','GCO','UIG','UIQ','DRF','WG2','XXX','UCB')',
     comp_web='0'
where id_type_comp='36';According to this, you are using quotes (') in quotes, you need to use two to make it work :
UPDATE type_composant
set  nom='RE',
     libelle='Réglementaire',
     process_export='YIYZD',
     lien='0',
     lien_technique='0',
     lien_reglementaire='1',
     lien_squelette='0',
     lien_demande='0',
     lien_pj='0',
     id_type_comp_rattach=null,
     id_type_comp_grp=null,
     imp_comp=0,
     imp_lien=0,
     is_spec=1,
     imp_sque=0,
     spec_table='reglementaire',
     spec_req='SELECT A.CDREGL AS CDREGL,
                      A.CDSTCO AS REPERTOIRE,
                      C.LILONG AS LIB_REP,
                      A.CDCODE AS CODE,
                      B.LIBLON AS LIB_CODE
               FROM HR.ZD00 A,
                      HR.ZD01 B,
                      HR.DI31 C
               WHERE A.NUDOSS = B.NUDOSS
               AND A.CDSTCO = C.VACDST
               AND C.CDLANG = ''F''
               AND B.CDLANG = ''F''
               AND CDSTCO  IN (''DS9'',''UPA'',''WS0'',''UGQ'',''UHU'',''DSJ'',''WF0'',''DRX'',''G01'',''DS3'',
                               ''GCP'',''UAA'',''G02'',''G00'',''DRH'',''DRB'',''WAA'',''DRE'',''WR2'',''DRC'',''DRJ'',''GPR'',''DRM'',
                               ''WA0'',''GCO'',''UIG'',''UIQ'',''DRF'',''WG2'',''XXX'',''UCB'')',
     comp_web='0'
where id_type_comp='36';Nicolas.

Similar Messages

  • Ora-00933 with JDBC thin

    Hi,
    after changing the Oracle DB-driver from the one provided
    with CF Enterprise to Oracle JDBC thin I run into ora-00933
    "Command not properly ended" exceptions. The SQL code syntax ist
    correct (runs in SQL*plus) and worked fine before. It seems to be
    related mostly to insert from subquery...
    Has anybody an idea what is going wrong?
    Are there any patches / fixes available ? (working with CF8
    Fix2, Oracle 10gR2, W2k3)
    Thanks in advance

    quote:
    The SQL is something like
    Your SQL, as it stands, looks OK to me, except
    you have an unnecessary extra set of ( ) around your select
    statement.
    insert into fu_dokument_status (oid, benutzer, status, datum)
    select 123, 'asdf', 'gelesen', sysdate
    from dual
    where not exists (select *
    from fu_dokument_status
    where oid=123
    and benutzer='asdf'
    and status='gelesen' )
    Having said that, you obviously provided the SQL
    after parameter substitutions have been made, and it would
    have been much more useful to see the actual CF code that you are
    using, you know, what is actually contained in your CFQUERY. I
    suspect that there may be something else going on with the way that
    it is written. Generic "something like" isn't terribly helpful.
    Phil

  • ORA-22816 with INSERT, UPDATE URGENT!!!!!

    =8-)
    HI.
    I have a big problem.
    With a forms, 6.0.4.10, i am connetting with 8.0.5,
    during UPDATE or INSERT, in this table ther are 18000 rows,
    i recive ORA-22816.
    The parameter DML Returning Value , is setting NO.
    Now, next week i'll install this system, and i have a
    big problem ....
    PLEASE HELP ME !!!!!!!!!!!
    Luca
    null

    Luca (guest) wrote:
    : =8-)
    : HI.
    : I have a big problem.
    : With a forms, 6.0.4.10, i am connetting with 8.0.5,
    : during UPDATE or INSERT, in this table ther are 18000 rows,
    : i recive ORA-22816.
    : The parameter DML Returning Value , is setting NO.
    : Now, next week i'll install this system, and i have a
    : big problem ....
    : PLEASE HELP ME !!!!!!!!!!!
    : Luca
    I have resolve the problem.
    In my table is here a LONG ROW.
    But, why the form using returnin in a table with LONG.
    null

  • OAF Update of Custom Table causing ORA-600 with database block corruption?

    Using OA Framework 12.1.3, running under EBusiness Suite 12.1.3
    Created Custom Web page operating against Custom Tables
    ISSUE
    On about 2% of new records, when OAF is UPDATING a record in a certain table, it  is failing with
    java.sql.SQLException: ORA-00607: Internal error occurred while making a change to a data block
    ORA-00600: internal error code, arguments: [kddummy_blkchk], [815], [26412], [6110], [], [], [], []
    ORA-06512: at line 1
    Before the DBA turned on 10.2.0.4.0 DB_BLOCK_CHECKING parameter, this actually
    resulted in corrupted data blocks in the database and corrupted indexes that
    eventually crashed the database and we had to do a full recovery with 2 days downtime.
    Now that we have turned on DB_BLOCK_CHECKING, it simply errors out and puts things
    in the alert log, but the records still fail to update as the writes are blocked.
    Then oddly, a few days later.. the records become editable.  And others fail.
    This is ONLY happening on the one particular table being updated by OAF.  Other custom pages
    posting to other custom tables are having no problems.   We've CTAS'd the table back and
    forth and recreated the indexes, and that did not help.
    Support says to post to the Forum  ( So I am! ) or hire Oracle consulting.. which doesn't make
    much sense given the error.  The Recovery Team that helped us in a separate SR ( we had
    to do db_repairs not just recovery ) felt it was an important problem the OAF team needed to
    strongly review.
    Anyone else encounter this already and know of a solution?
    TIA
    Karl

    After MANY hours of trial and error and research, we've identified ONE use case that seems to apply to 90% of the issue we have encountered.
    YMMV.
    The BC4J generated SQL which is generating the ORA-600 is
    BEGIN UPDATE XXRETURNHEADER ReturnHeaderEO SET INTERNAL_TEXT=?,LAST_MOD_USERNAME=?,OBJECT_VERSION_NUMBER=?,LAST_UPDATE_DATE=?,LAST_UPDATED_BY=?,LAST_UPDATE_LOGIN=? WHERE RMA_NUMBER=? AND ORGANIZATION_ID=? RETURNING TROUBLESHOOT_DATE, FAA_TAG_DATE, FAILURE_ANALYSIS_DATE, LAST_MOD_DATE, FAA_REVISED_DATE, TTE_TECH_SEND_DATE, TTE_REP_RESPONSE_DATE, TTE_REP_APPROVED, TTE_RMA_RANDOM_KEY, OBJECT_VERSION_NUMBER, LAST_UPDATE_DATE, LAST_UPDATED_BY, LAST_UPDATE_LOGIN INTO ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?, ?; END;".
    We determined that if TTE_RMA_RANDOM_KEY was not a null value, we would get an ORA-600 error whenever we did an APPLY from the OAF Page to update the record.
    If we set that table attribute to NULL for the record using SQL.. then used the  OAF Page to APPLY.. it worked fine and the record saved without error.
    We then modified the EO to NOT   "Refresh After Update"  ( thus removing it from the RETURNING clause generated )... and even if the TTE_RMA_RANDOM_KEY
    had a value... the OAF Page APPLY worked and the record saved without error.
    I cannot identify anything from the User programming side that is wrong ( and neither could Oracle ), and it REALLY should be in the RETURNING clause list of
    attributes.. but this is the only workaround I've found that doesn't crash the Page and irritate the user to no end.
    I have reported my findings via the SR back to Oracle to do with it what they may... but it looks strongly ,to me, to be an error in the BC4J/JDBC/Database
    coordination and passing data between those black boxes.

  • Does INNER JOIN work with Oracle 8i ? (ORA-00933)

    hi,
    I try to execute the sql:
    SELECT
    A0.FULL_NAME,A0.MANAGER_ID,A0.DEPT_NO,A0.TOP_DEPT
    FROM
    HR_ORG A0
    INNER JOIN
    HR_EMP A1
    ON
    A0.MANAGER_ID=A1.EMP_NO
    WHERE
    A1.NAME = 'michael'
    but I caught an exception:
    java.sql.SQLException: ORA-00933: SQL...(message in
    chinese)
    Does INNER JOIN work with Oracle 8i ?
    thanks.

    INNER JOIN syntax is introduced in 9i, it does not exists in 8i. You can rewrite your statement:
    SELECT
    A0.FULL_NAME,A0.MANAGER_ID,A0.DEPT_NO,A0.TOP_DEPT
    FROM
    HR_ORG A0
    , HR_EMP A1
    WHERE
    A0.MANAGER_ID=A1.EMP_NO
    AND
    A1.NAME = 'michael'

  • Update from table ORA-00933 error

    I use Oracle 10g. The following throws an ORA-00933 SQL command not properly ended Error
    update fb_mst_complaint
    set sub_category = n.subcategory
    from fb_mst_complaint s,
    select a.docket_no, a.sub_category, c.subcategory
    from fb_mst_complaint a,
    +( select category, min(subcategory) subcategory+
    from fb_subcategory
    where activated > 0
    group by category
    +) c+
    where a.category =
    +( select distinct a.category from fb_subcategory b+
    where b.category = a.category
    and b.subcategory = c.subcategory
    and b.activated > 0
    +)+
    and a.category = c.category
    and a.sub_category <= 0
    ) n
    where s.docket_no = n.docket_no
    and s.sub_category = n.sub_category
    and s.docket_no = 8573;
    The error is shown in the FROM clause. However, The SELECT statement which makes up the alias name 'n' works accurately.
    Please help. Thanks for the help in advance.
    Edited by: user11195221 on May 24, 2009 6:35 AM

    user11195221 wrote:
    The issue is that the inner select returns multiple values and therefore cannot be set as mentioned.Well then you cannot do this in a single UPDATE statement (you could use the rownum = 1 construct but it would make no sense without knowing the business context).

  • ORA-00933 - Error in PL/SQL for Form with report.

    Hello,
    I am getting this error :
    failed to parse SQL query:
    ORA-00933: SQL command not properly ended
    and my PL/SQL function body returning SQL is as follows:
    Declare
    q varchar2(32767);
    w varchar2(4000);
    v_total varchar2(10);
    Begin
    v_total:='TOTAL' ;
    q:=' SELECT ASR_DB_CLIENT.CLIENT_NAME, ';
    q:=q||' ASR_DB_OIS.ACCT_NAME, ';
    q:=q||' ASR_DB_OIS.ACCT_NBR, ';
    q:=q||' ASR_DB_OIS.INCEPT_DT, ';
    q:=q||' asr_db_prod.MKT_CODE, ';
    q:=q||' asr_db_prod.asst_clss, ';
    q:=q||' ASR_DB_OIS.PROD_CODE, ';
    q:=q||' ASR_DB_OIS.GROUP_CODE, ';
    q:=q||' ASR_DB_PLAN.TAX_STAT, ';
    q:=q||' asr_db_clnt_type.clnt_type_name, ';
    q:=q||' asr_db_plan_type.plan_type_name, ';
    q:=q||' ASR_DB_OIS.ACCT_type, ';
    q:=q||' ASR_DB_PLAN.CNTRY_CODE, ';
    q:=q||' ASR_DB_OIS.DISCRET_FLAG, ';
    q:=q||' ASR_DB_OIS.ASST_BAL ';
    q:=q||' FROM ASR_DB_OIS, ASR_DB_PLAN, ASR_DB_CLIENT, ASR_DB_PROD, ';
    q:=q||' asr_db_plan_type, ';
    q:=q||' asr_db_Clnt_type ';
    q:=q||' WHERE';
    q:=q||' ASR_DB_OIS.PLAN_ID = ASR_DB_PLAN.PLAN_ID and ';
    q:=q||' ASR_DB_OIS.as_of_dt = ASR_DB_PLAN.as_of_dt and ';
    q:=q||' ASR_DB_PLAN.CLIENT_ID = ASR_DB_CLIENT.CLIENT_ID and ';
    q:=q||' ASR_DB_OIS.as_of_dt = ASR_DB_CLIENT.as_of_dt and ';
    q:=q||' asr_db_ois.prod_code = asr_db_prod.prod_code and ';
    q:=q||' ASR_DB_PLAN.plan_type_code = ASR_DB_PLAN_type.plan_type_code and ';
    q:=q||' ASR_DB_Client.clnt_type_code = ASR_DB_clnt_type.clnt_type_code and ';
    q:=q||' ASR_DB_OIS.AS_OF_DT = :p99_asofdate ';
    IF :P2_ROLLUPSLEEVE = 'RU'
    THEN
    q :=q||' and ASR_DB_OIS.PARENT_OIS_ID is null ';
    Else
    q :=q||' and ASR_DB_OIS.ACCT_TYPE like "%"'||v_total||'"%" ';
    q :=q||' and ASR_DB_OIS.PARENT_OIS_ID is not null ';
    END IF;
    return q;
    end;
    Why this is failing ?
    Is "%"'||v_total||'"%" '; incorrect ?
    P2_ROLLUPSLEEVE is a radio button.
    Please advise....
    Thanks,
    HM

    And
    Also, I get the following error when I try few other things like
    q :=q||' and ASR_DB_OIS.ACCT_TYPE = '||v_total||' ';
    or
    q :=q||' and ASR_DB_OIS.ACCT_TYPE = "||v_total||" ';
    failed to parse SQL query:
    ORA-00904: "TOTAL": invalid identifier
    And
    ORA-06550: line 43, column 41: PLS-00103: Encountered the symbol "TOTAL" when expecting one of the following: * & = - + ; < / > at in is mod remainder not rem <> or != or ~= >= <= <> and or like LIKE2_ LIKE4_ LIKEC_ between || member SUBMULTISET_ The symbol "* was inserted before "TOTAL" to continue.
    When I try
    q :=q||' and ASR_DB_OIS.ACCT_TYPE = "'TOTAL'" ';
    Any helpful tips will be much appreciated.
    Thanks,
    HM

  • How to merge with multiple updates

    Hi All,
    can someone help with merge and multiple updates when matched ?
    create table foo
    id number,
    name varchar2(30),
    col1 date,
    col2 date
    create table bar
    id number,
    name varchar2(30),
    col1 date,
    col2 date
    insert into foo values ( 1, 'test1', sysdate + 30, sysdate);
    insert into foo values ( 2, 'test2', sysdate + 30, sysdate);
    insert into foo values ( 3, 'test3', sysdate + 30, sysdate);
    MERGE INTO BAR T1
    USING (SELECT id, NAME, col1, col2 FROM foo) T2
    ON (T1.id = T2.id)
    WHEN MATCHED THEN
    UPDATE SET T1.NAME=T2.NAME where T1.Name != T2.Name
    UPDATE SET T1.col1=T2.col1 where T1.col1 != T2.col1
    UPDATE SET T1.col2=T2.col2 where T1.col2 != T2.col2
    WHEN NOT MATCHED THEN
    INSERT (ID, NAME, col1, col2 ) VALUES (t2.Id, t2.NAME, t2.col1, t2.col2);
    Reason for having multiple updates to same row is i want to update the column only if name, col1, and col2 columns have changed. So, I want to first match by rows and then update the columns in bar that have changed in foo.
    Any thoughts on how I might do this in merge ?. I get the foll. error
    ERROR at line 6:
    ORA-00933: SQL command not properly ended
    Thanks
    Vissu

    I think you will be better off reading this link.
    http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_9016.htm#SQLRF01606
    It will be something like this.
    MERGE INTO BAR T1
    USING (SELECT id, NAME, col1, col2 FROM foo) T2
    ON (T1.id = T2.id)
    WHEN MATCHED THEN
    UPDATE SET T1.NAME=T2.NAME ,
                          t1.col1 = t2.col2 ,
                          t1.col2 = t2.col2
    where T1.Name != T2.Name or t1.col1 != T2.col1 or t1.col2 != t2.col2
    WHEN NOT MATCHED THEN
    INSERT (ID, NAME, col1, col2 ) VALUES (t2.Id, t2.NAME, t2.col1, t2.col2);Please note this code is untested.
    Regards
    Raj

  • Errors ORA-01747 / ORA-00933 ???

    I'm running Oracle 8i on win98.
    When I try to update numbers in a NUMBER(7,3) column with values like 18,48 I get this errormessage:
    ORA-01747: invalid user.table.column-, table.column- or columnspecification
    If I enter numbers without decimals in the same column, I get this error-message:
    ORA-00933: SQL-command incorrectly terminated.
    (both messages are translated from danish)
    What is wrong ?
    Jesper

    all that means..is
    ora-01747
    A column name was specified improperly in the current SQL statement
    ORA-00933: SQL command not properly ended
    Cause: The SQL statement ends with an inappropriate clause. For example, an ORDER BY clause may have been included in a CREATE VIEW or INSERT statement.
    ORDER BY cannot be used to create an ordered view or to insert in a certain order. Also, an improper SQL ending occurs if IN clause is used with only one argument (IN(X),
    for example). An IN clause must have two or more arguments.
    Action: Correct the syntax by removing the inappropriate clauses. It may be possible to duplicate the removed clause with another SQL statement. For example, to order the
    rows of a view, do so when querying the view and not when creating it. This error can also occur in SQL*Forms applications if a continuation line is indented. Check for
    indented lines and delete these spaces.
    these are pretty typicall errors...
    hope this helps
    [email protected]

  • ORA-00933 Error

    Hi all,when i am trying to perform below query i am getting PL/SQL: ORA-00933: SQL command not properly ended Can someone point out where i am going 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-quotedThanks in advance!!

    Even tried that..
    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;
    SQL> /
    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

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

    This is my first attempt at pl/sql functions with dynamic sql. It will compile, but when I try to test it I get the ORA-00933 error at line 147. line 147 is OPEN retval FOR report_query;
    Please take a look and let me know what it wrong! thanks
    {CREATE OR REPLACE FUNCTION TSARPTS.Stats (v_Hub       IN VARCHAR2,
                                              v_type      IN VARCHAR2,
                                              v_subtype   IN VARCHAR2)
       RETURN SYS_REFCURSOR
    IS
       retval           SYS_REFCURSOR;
       report_query_a   VARCHAR2 (10000)
                           := '
      SELECT hub,
             CASE
                WHEN Total = 0 OR Pass_1st = 0 THEN 0
                ELSE ROUND (Pass_1st / (Total) * 100, 2)
             END
                AS Pass_1st_percent,
             CASE
                WHEN Total = 0 OR Pass_2nd = 0 THEN 0
                ELSE ROUND (Pass_2nd / (Total) * 100, 2)
             END
                AS Pass_2nd_percent,
             CASE
                WHEN Total = 0 OR Pass_3rd = 0 THEN 0
                ELSE ROUND (Pass_3rd / (Total) * 100, 2)
             END
                AS Pass_3rd_percent,
             CASE
                WHEN Total = 0 OR DNM = 0 THEN 0
                ELSE ROUND (DNM / (Total) * 100, 2)
             END
                AS DNM,
             CASE
                WHEN Total = 0 OR Incomplete = 0 THEN 0
                ELSE ROUND (Incomplete / (Total) * 100, 2)
             END
                AS Incomplete
        FROM (  SELECT hub,
                       SUM (DECODE (result, ''Pass_on_1st'', 1, 0)) Pass_1st,
                       SUM (DECODE (result, ''Pass_on_2nd'', 1, 0)) Pass_2nd,
                       SUM (DECODE (result, ''Pass_on_3rd'', 1, 0)) Pass_3rd,
                       SUM (DECODE (result, ''DNM'', 1, 0)) DNM,
                       SUM (DECODE (result, ''INCOMPLETE'', 1, 0)) Incomplete,
                         SUM (DECODE (result, ''Pass_on_1st'', 1, 0))
                       + SUM (DECODE (result, ''Pass_on_2nd'', 1, 0))
                       + SUM (DECODE (result, ''Pass_on_3rd'', 1, 0))
                       + SUM (DECODE (result, ''DNM'', 1, 0))
                       + SUM (DECODE (result, ''INCOMPLETE'', 1, 0))
                          Total
                  FROM employees_vw a, pse_vw b
                 WHERE     a.emplid = b.emplid
                       AND status IN (''S'', ''I'', ''N'')
                       AND TYPE = ''PSE''
       report_query_b   VARCHAR2 (10000)
                           := ' 
    SELECT hub,
           TYPE,
           subtype,
           CASE
              WHEN Total = 0 OR Pass_1st = 0 THEN 0
              ELSE ROUND (Pass_1st / (Total) * 100, 2)
           END
              AS Pass_1st_percent,
           CASE
              WHEN Total = 0 OR Pass_2nd = 0 THEN 0
              ELSE ROUND (Pass_2nd / (Total) * 100, 2)
           END
              AS Pass_2nd_percent,
           CASE
              WHEN Total = 0 OR Pass_3rd = 0 THEN 0
              ELSE ROUND (Pass_3rd / (Total) * 100, 2)
           END
              AS Pass_3rd_percent,
           CASE
              WHEN Total = 0 OR DNM = 0 THEN 0
              ELSE ROUND (DNM / (Total) * 100, 2)
           END
              AS DNM,
           CASE
              WHEN Total = 0 OR Incomplete = 0 THEN 0
              ELSE ROUND (Incomplete / (Total) * 100, 2)
           END
              AS Incomplete
      FROM (  SELECT hub,
       TYPE,
           subtype
                      SUM (DECODE (result, ''Pass_on_1st'', 1, 0)) Pass_1st,
                       SUM (DECODE (result, ''Pass_on_2nd'', 1, 0)) Pass_2nd,
                       SUM (DECODE (result, ''Pass_on_3rd'', 1, 0)) Pass_3rd,
                       SUM (DECODE (result, ''DNM'', 1, 0)) DNM,
                       SUM (DECODE (result, ''INCOMPLETE'', 1, 0)) Incomplete,
                         SUM (DECODE (result, ''Pass_on_1st'', 1, 0))
                       + SUM (DECODE (result, ''Pass_on_2nd'', 1, 0))
                       + SUM (DECODE (result, ''Pass_on_3rd'', 1, 0))
                       + SUM (DECODE (result, ''DNM'', 1, 0))
                       + SUM (DECODE (result, ''INCOMPLETE'', 1, 0))
                          Total
                  FROM employees_vw a, pse_vw b
                 WHERE     a.emplid = b.emplid
                       AND status IN (''S'', ''I'', ''N'')
                     AND TYPE = ''PSE''
       report_query     VARCHAR2 (10000);
    BEGIN
       IF v_hub <> '*'
       THEN
          report_query := report_query_a;
       ELSE
          report_query := report_query_b;
       END IF;
       IF v_hub <> '*'
       THEN
          report_query :=
             report_query || ' and hub = ''' || v_hub || ''' GROUP BY hub )
    GROUP BY hub,
             Pass_1st,
             Pass_2nd,
             Pass_3rd,
             Total,
             DNM,
             Incomplete';
       END IF;
       IF v_type <> '*' AND v_subtype <> '*' AND v_hub <> '*'
       THEN
          report_query :=
                report_query
             || ' and hub = '''
             || v_hub
             || ''' and type = '''
             || v_type
             || ''' and subtype= '''
             || v_subtype
             || '''
              GROUP BY hub,
                     TYPE,
                     subtype,
            GROUP BY hub,
                     TYPE,
                     subtype,
                     Pass_1st,
                     Pass_2nd,
                     Pass_3rd,
                     Total,
                     DNM,
                     Incomplete';
       END IF;
       OPEN retval FOR report_query;
       RETURN retval;
    END;
    Edited by: user10821012 on May 13, 2010 9:56 AM

    What you are seeing is pretty common. When I work with dynamic SQL I usually include some logic to put the dyanmic SQL into a string and a means to see what was generated, something like (untested here)
      v_sql_c := 'select * from dual';
      open refcur for v_sql_c;
    exception
      when others then
         insert into work_table (clob_column) values (v_sql_c);so I can later query the table to get to the generated SQL for debugging, something like
      select * from work_table;I also try to write dynamic SQL so I can paste it from the work table right into query execution without editing.

  • Cursor with for update clause problem

    Hi all,
    We are having this problem with Oracle 8.1.7 where in we have a cursor with for update clause. The PL/SQL script used to work fine with Oracle 8.0.5 but is causing problems with Oracle 8.1.7. What the script is ending up doing in 8.1.7 is that it updates only one record instead of updating close to 60000 which it used to do in Oracle 8.0.5
    The script just hangs after updating one record. We have replicated the same problem.
    Has anyone seen this error before and attained resolution?
    Thanks

    Hello ,
    I have found the same / very close to the same problem. I tried the code below in Oracle 10.2.0.1 and got the following error after the first loop.
    ORA-01002: fetch out of sequence
    ORA-06512: at "DEMO_TEST_RESEARCH_PKG", line 18
    ORA-06512: at line 7
    After trying to debug it , i thought i would try it in Oracle 9.0.2.0.7.0 , and to my suprise it worked fine.
    Am i missing something ? Thanks in advance , ...
    I have included the code i was running ...
    PROCEDURE WhereCurrentOf(Param1 IN NUMBER) IS
    v_title_eng ISSUES.TITLE_ENG%TYPE;
    v_issue_id ISSUES.ISSUE_ID%TYPE;
    CURSOR issues_cur
    IS
    SELECT issue_id,title_eng
    FROM issues
    WHERE title_eng IS NULL
    FOR UPDATE OF title_eng;
    BEGIN
    FOR i IN issues_cur
    LOOP
    FETCH issues_cur INTO v_issue_id,v_title_eng;
    EXIT WHEN issues_cur%NOTFOUND;
    DBMS_OUTPUT.PUT_LINE(v_issue_id||' This was the english title before : '||v_title_eng);
    v_title_eng := 'This is my title';
    UPDATE issues
    SET title_eng = v_title_eng
    WHERE CURRENT OF issues_cur;
    DBMS_OUTPUT.PUT_LINE(v_issue_id||' This is the english title after : '||v_title_eng);
    END LOOP;
    END WhereCurrentOf;

  • Java.sql.SQLException: ORA-00933: error when  executing query

    Hello,
    I am trying to execute the following query from a jsp page.
    String sqlUpdate ="UPDATE table_name SET name ='"+name+"', description='"+description+"', proj_link='" projlink"', active='" active"',sort_order='" order"',image='" image"',category='" category"', technology='" technology "' WHERE id="+id+" ";
    stmt.executeQuery(sqlUpdate);
    I get the follwoing error java.sql.SQLException: ORA-00933: SQL command not properly ended
    When I omit "description" from the query it executes fine. But when I place it back into the query I get the above error. The table is in Oracle database and the datatype of description id varchar2(4000). I declared all the variables used in the query, I then assigned values caught from the form and then am trying to update the form varibles in the table.
    Thanks,
    Nikky128

    Nikky128 wrote:
    Hello,
    I am trying to execute the following query from a jsp page.There's a big part of your problem. You shouldn't be doing database stuff in JSPs. If you must, you should be using JSTL and its <sql> tags.
    String sqlUpdate ="UPDATE table_name SET name ='"+name+"', description='"+description+"', proj_link='" projlink"', active='" active"',sort_order='" order"',image='" image"',category='" category"', technology='" technology "' WHERE id="+id+" ";Not using PreparedStatement here is just a silly noob error.
    When I omit "description" from the query it executes fine. But when I place it back into the query I get the above error. The table is in Oracle database and the datatype of description id varchar2(4000). I declared all the variables used in the query, I then assigned values caught from the form and then am trying to update the form varibles in the table.Probably a single or double quote that you can't see. PreparedStatement will eliminate that problem.
    %

  • Sql error- ORA-00933

    Hai all,
    11.2.2 on solaris 10
    UPDATE MED_SECURITY_PRICES
    SET s.change_price = ((w.Prev/10)-(w.Last/10))
    ,s.wa_price = ((w.AMT/(w.VOL*100))*1000) -- (DailyValue/DailyVolume)*1000
    From MED_SECURITY_PRICES s JOIN stg_ws.DAILYSTKQUOTATIONDATA w
    ON MED_SECURITY_PRICES.SECURITY_CD = med_ws.DAILYSTKQUOTATIONDATA.STK
    AND MED_SECURITY_PRICES.AS_OF_DATE = med_ws.DAILYSTKQUOTATIONDATA.CLOSINGDATE
    WHERE s.INSTRUMENT_CD = 'EQTY'
    AND s.SOURCE_SYS = 'MEDT';
    ORA-00933: SQL command not properly ended

    KaiS wrote:
    Hai all,
    11.2.2 on solaris 10
    UPDATE MED_SECURITY_PRICES
    SET s.change_price = ((w.Prev/10)-(w.Last/10))
    ,s.wa_price = ((w.AMT/(w.VOL*100))*1000) -- (DailyValue/DailyVolume)*1000
    From MED_SECURITY_PRICES s JOIN stg_ws.DAILYSTKQUOTATIONDATA w
    ON MED_SECURITY_PRICES.SECURITY_CD = med_ws.DAILYSTKQUOTATIONDATA.STK
    AND MED_SECURITY_PRICES.AS_OF_DATE = med_ws.DAILYSTKQUOTATIONDATA.CLOSINGDATE
    WHERE s.INSTRUMENT_CD = 'EQTY'
    AND s.SOURCE_SYS = 'MEDT';
    ORA-00933: SQL command not properly endedThat's not how update statements work in Oracle.
    http://docs.oracle.com/cd/E11882_01/server.112/e26088/statements_10008.htm#SQLRF01708
    Will get you started on the proper syntax.
    It looks like (can't really tell since all you posted was a non-working sql statement, i have no idea what your tables or their cardinalities are) you may need to update a join, or use a MERGE statement.
    Here's an example of updating a join
    http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:288016031632
    The MERGE statement should be easily found through a google search (there are tonnes of examples out there).
    Cheers,

  • 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?

Maybe you are looking for

  • Keep sleeping with external display

    I just got a brand new samsung syncMaster (730mw to be exact) and went right on to pug it into my 12 inch powerbook, with the help of my minidvi to DVI of course. I followed apple's "correct" procedure. Connecting the power cord, hook up external mon

  • After update 4.2.1 unable to access mobile data network

    Hello, yesterday, i have updated to 4.2.1 Today, i have activated the flight modus for a while... Then go back into the normal modus (flight modus off). Now, the access to the mobile data network is never possible. Access via WIFI is allways ok. Now,

  • Error converting SQL Server text field to Oracle CLOB

    I am trying to convert an SQL Server DB to Oracle DB using DB link. The issue I am facing is one of the SQL Server table contains text field and we are trying to convert the text field to CLOB. The error I am getting is "SQL Error: ORA-00997: illegal

  • Webdynpro program name for SRM Portal

    Hi How do we know which webdynpro prog is called when i click PR item in SRM Sourcing cockpit. When i click Text/Attachment tab for the item which View or webdynpro is called? Pls guide me how to find the respective Webdynpro program for the Portal p

  • Best multi-function printer to work with both OS 10.3.9 and OS 10.4.6?

    Now that HP's built-in obsolescence has left me looking to replace my once-trusty old psc 2175, I'm looking for another printer/scanner/copier that will do the same basics reliably & economically & with the same or better durability. (including photo