Linq Error : Invalid 'where' condition. An entity member is invoking an invalid property or method

Hi,
I am running Linq query in CRM2013 and throwing error : Invalid 'where' condition. An entity member is invoking an invalid property or method.
My Code is as below;
var conntionRecord1Id = (from connectionBase in orgServiceContext.CreateQuery("connection")
where connectionBase["record1roleid"] != null
select connectionBase["record1id"]).Distinct();
var query = from opportunity in orgServiceContext.CreateQuery("opportunity")
where !conntionRecord1Id.Contains(opportunity["opportunityid"])
orderby opportunity["createdon"] ascending
select new
Topic = opportunity.Attributes.Contains("name") == true ? opportunity["name"] : null,
OpportunityId = opportunity.Attributes.Contains("opportunityid") == true ? opportunity["opportunityid"] : null,
PostalCode = opportunity.Attributes.Contains("new_address_postalcode") == true ? opportunity["new_address_postalcode"] : null,
Error throwing on second query.
Please help
Thanks,

Not sure I can help with that.  I might debug this code and see what data resides in the first query for conntionRecord1Id.
Are you trying to get a list of opportunityId's?  If so you might need to do a foreach loop on the results of conntionRecord1Id.
 Something like...
foreach(var recordid in conntionRecord1Id)
          (do something to the record...)

Similar Messages

  • My Timesheet error: invalid property

    Hi ,
    When i am trying to create the time sheet in fiori i am getting the error "Invalid property",we added 2 custom fields in cats,but i am not sure is there any changes i need to do in the GW or Front end .Can any body suggest any solutions for this.
    Thanks,
    Mohan

    Hi Mohan,
    As a first step make sure all the GW and front end requirements are up to date. You can check that here. If that all is ok then I would suggest making sure you have all the necessary support packs in place - check here.
    Thanks,
    Liz
    (SAP Technology RIG)

  • Rawvalue reference Error: Invalid property get operation; dataGroup doesn't have property

    When I reference a rawvalue of an object that does not exist I get an error.  If the object does not exist i want to hid the form field. Any help with the javascript to do this

    Hi,
    This seems a little strange, a dataGroup sounds like you are referencing an object in your data connection, not a form object.  A dataGroup object represents a group element, such as a complex type in an XML Schema definition and it does not have a rawValue (with uppercase "V") property.  If you are referencing this object via a resolveNode call then you will get a null result if it does not exist.
    Regards
    Bruce

  • WebAS - invalid property value

    Hi,
    I started to apply SP11 to WebAS 6.4 SP9 and now having problems starting the dispatcher-process. The developer-trace shows two errors:
    error => Invalid property value [box.number/J2EJC00MC00009304] [jstartxx.c 808]
    error => Invalid property value [system.id/0] [jstartxx.c 808]
    I can't figure out why these values are wrong. What are the right values and where to set them?

    Hello,
    I found the same problem.
    When upgrading from WebAS 6.40 SP09 => SP11 (or SP12) the update process stops before "Deploy online" because the J2EE  engine came not up.
    This is because a wrong jvm parameter in the dispatchers default configuration in  WebAS 6.40 SP9:
    Xms170m instead <b>-</b>Xms170m.
    To fix the problem it seem to be the best choise to use the configtool BEFORE starting the upgrade to SP11 or 12.
    Move to the instance_IDxxx\dispatcher_IDxxx general tab and correct the wrong jvm parameter Xms170m to -Xms170m.
    Thats all.

  • Error: No first field of table index in where condition

    I've got following errors while doing code inspector or extended syntax check:
    (Large table VEKP: No first field of table index in where condition).
    My code is like below as per as code-logic.
    What's the necessary changes to do to remove the above code?
    SELECT VENUM
                 BRGEW
                 BTGEW
                 BTVOL
                 VOLEH
                 VHILM
                 LMENG
                 BREIT
                 HOEHE
                 MEABM
                 VPOBJKEY
                 FROM VEKP
                 INTO TABLE i_vekp
                 WHERE vpobjkey = w_mkpf-xblnr.
    IF sy-subrc = 0.
    SORT i_vekp BY venum.
    ENDIF.
    How can I remove the error? How to use index in where clause I'm not getting and on which key? or, should I use the statement "EC C1_NOFIRST to remove the error?
    Kindly guide.

    > should I use the statement "EC C1_NOFIRST to remove the error?
    you can not really ask this question in this forum. This check gives you hints to the most serious problems in database accesses, if you want to override it, then you should better forget about performance.
    If you are not familiar how databases use indexes, then check resources in the net or in books, in
    short they use indexes and the indexes are absolutly necessary with large tables, if you want to get
    good performance.
    But indexes can only be used in the order of their field, until a field is not used in the WHERE-condition, (gap). If the gap is already the first field, then the index can not be used at all.
    In your case there is not first field of any index specified in the WHERE condition, so the SELECT might be slow. Either you can add a condition on a first index field or you have to live with a poor performance.
    Siegfried

  • Getting an error saying no primary index is used in where condition in SCI.

    Hi,
    I have develped a report using table PAYR.
    The selection -screen of this report consists of Runid, Identification and Payment date.
    The select qurey i used is
    SELECT chect
               zaldt
               rwbtr
               znme1
               voidd
          FROM payr INTO TABLE it_details
          WHERE laufd EQ p_laufd AND
                laufi EQ p_laufi AND
                zaldt EQ p_date.
    But when i check the code with code inspector im getting an error saying no primary index is used in where condition.
    How can i solve this problem.
    Pls. provide some pointers.
    Thanks.

    HI Deepti,
         The problem is since the fields used in where condition is not mentioned in any of the indexes created for table ( you can check the maintained indexes for table by clicking on the 'Indexes' button or ctrl+F5)
          Atlease include MANDT in where condition, or create your own index with the fields which you have used in SELECT query.
    this will solve the problem
    Regards
    Seema

  • OS error invalid argument IS error member load

    <p>Dear all,</p><p> </p><p>When I use the Analytics Integration Service to load the memberinto the Essbase, it encounters the following error:</p><p> </p><p><b><i>OS Error Invalid argument IS Error Member load terminatedwith error</i></b></p><p> </p><p>This error appears nearly at the end of the member loadingprocess.</p><p> </p><p>Please advise and help. Thanks.</p>

    Hi,
    The xml was just for a test nothing else. By the way would you like to have a look at these?
    [ A|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233313338333133303333%7D.do]
    [B|https://www.sdn.sap.com/irj/servlet/prt/portal/prtroot/com.sap.km.cm.docs/oss_notes/sdn_oss_boj_erq/sap(bD1lbiZjPTAwMQ==)/bc/bsp/spn/scn_bosap/notes%7B6163636573733d36393736354636443646363436353344333933393338323636393736354637333631373036453646373436353733354636453735364436323635373233443330333033303331333233313338333733363333%7D.do]
    Does it help?
    Regards,
    AG.

  • Modeler error: invalid entity name

    Hello,
    Newbie question: what does the "modeler error: invalid entity name" error message mean when using the wscompile tool of the wsdp? The full error is
    error: modeler error: invalid entity name: "foo" (in namespace: "http://xml.foo")
    Does it point to a problem with the namespace, part of the entity or something else?
    Thanks in advance,

    I believe it means the identifier called out doesn't belong in the namespace that the compiler thinks it is using.
    I've had this problem, and it was when the XML Schema definition had complex types that did not contain the namespace prefix (e.g. using "MyType" instead of "myxsd:MyType" in the schema definition).

  • Concatenation error - when i use text column value in where condition.

    Hi,
    i am creating Materialized view using few columns from two tables and as per requirement i need to prepare select statement with where condition in another column.(new column)
    i tried like below....
    create materialized view MAIN
    refresh force on demand
    as
    select
    a.table_name,
    a.column_name,
    b.trial_name,
    'select * from '||a.table_name||' where '||a.column_name|| ' = '|| b.trial_name||';' "QUERY"
    from
    exp_csv_tB a,
    exp_csv_tr b;
    a.table name value is : monitoring_table
    a.column_name value is : study
    b.trial_name = fty777
    Materialized view created with extra column but it is not added '' (codes) to text value in where condition.
    output which i got is :
    select * from monitoring_table where study = fty777;
    but
    i need output like
    select * from monitoring_table where study = 'fty777';
    fty777 value should be in codes like 'fty777'. i read some articles but didnt get this example.
    please help.

    Try this:
    CREATE MATERIALIZED VIEW main
    REFRESH FORCE ON DEMAND
    AS
    SELECT
    a.table_name,
    a.column_name,
    b.trial_name,
    'select * from '||a.table_name||' where '||a.column_name|| ' = '''|| b.trial_name||'';'' "QUERY"
    FROM
    exp_csv_tb a,
    exp_csv_tr b;
    You have to give double single codes for semi-colons ..
    Regards..

  • FDM Conditional Map error - Invalid Procedure Call or arguments

    Hi,
    I am trying to add a script to my LIKE mapping to pick up the target Product based on the type of target account.
    This is the script I have written -
    If Mid(varValues(14),1,1) = "6" Then Result = varValues(37) Else Result = varValues(21) End If
    When i try to import (using Integration script from a database table) I get the error - Invalid Procedure Call or arguments.
    If I remove the 'Else' part, it imports successfully. Also I tried the same using Case statements - I get the same error, if I remove 'Case Else' it works fine.
    Any hekp on this would be highly appreciated!
    Thanks in advnace...

    This mapping is associated with Product dimension - UD10 (varValues(37)). UD10 is active and mappable, mapped to target Product dimension. UD2 (varValues(21)) is the lookup which is not mapped to a target dimension.

  • How Can I Change the  Where Condition In the First SQL Query?

    SELECT IND_SSN, BEG_SVC_DT, END_SVC_DT,
    TRUNC(MONTHS_BETWEEN((TO_DATE('19'||END_SVC_DT,'YYYYMMDD')),BEG_SVC_DT)/12),
    mod(trunc(months_between((to_date('19'||end_svc_dt,'YYYYMMDD')),BEG_SVC_DT)),12),
    DECODE((SUBSTR(END_SVC_DT,5,2) - SUBSTR(BEG_SVC_DT,1,2)+1),-1,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -2,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -3,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -4,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -5,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -6,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -7,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -8,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -9,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -10,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -11,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -12,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -13,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -14,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -15,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -16,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -17,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -18,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -19,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -20,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -21,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -22,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -23,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -24,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -25,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -26,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -27,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -28,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -29,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -30,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    -31,((SUBSTR(END_SVC_DT,5,2)+ 31) - SUBSTR(BEG_SVC_DT,1,2)),
    30,0,
    (SUBSTR(END_SVC_DT,5,2) - SUBSTR(BEG_SVC_DT,1,2)+1))
    FROM SVC_OCCURRENCES
    WHERE end_svc_dt not in ('PRESENT')
    AND SUBSTR(END_SVC_DT,1,1) IN '9'
    AND SUBSTR(END_SVC_DT,5,2) NOT IN ('31')
    and (SUBSTR(END_SVC_DT,5,2) - SUBSTR(BEG_SVC_DT,1,2)+1) not in ('30')
    UNION
    SELECT IND_SSN, BEG_SVC_DT, END_SVC_DT, NULL, NULL, NULL
    FROM SVC_OCCURRENCES
    WHERE SUBSTR(END_SVC_DT,1,1) IN 'P'
    The above code works fine and I get the correct numeric values from the SQL
    query when the varchar2 end_svc_dt field is numeric however if I have encoded
    the word 'PRESENT' in the varchar2 end_svc dt field the SQL query aborts at
    the last statement in the WHERE condition. The beg_svc_dt field is a Date field.
    and (SUBSTR(END_SVC_DT,5,2) - SUBSTR(BEG_SVC_DT,1,2)+1) not in ('30')
    I get the following error message
    ERROR ORA-0722 INVALID NUMBER
    I encode the word 'PRESENT' in a varchar2 end_svc_dt field on an Oracle form. This is the only word that can be encoded.
    Is there some way that I can bypass the last statement in the where condition and
    compute the values from the SQL query without having the SQL query abort?
    Eventually I want to do this in a report. I know that this sounds strange but can it be done?

    The above code works fine and I get the correct
    numeric values from the SQL
    query when the varchar2 end_svc_dt field is numeric
    however if I have encoded
    the word 'PRESENT' in the varchar2 end_svc dt field
    the SQL query aborts at
    the last statement in the WHERE condition.Ouch!
    Storting dates in VARCHAR2 columns is bad practice, poor design and makes for horrible code.
    The beg_svc_dt field is a Date field.
    and (SUBSTR(END_SVC_DT,5,2) -
    SUBSTR(BEG_SVC_DT,1,2)+1) not in ('30')If it's a date field then why on earth are you trying to SUBSTR it. SUBSTR = sub-string i.e. take a sub section of a string not sub-date.
    I get the following error message
    ERROR ORA-0722 INVALID NUMBERAnd you're surprised by this?
    Is there some way that I can bypass the last
    statement in the where condition and
    compute the values from the SQL query without having
    the SQL query abort?Store your dates properly, use additional flag columns for non-date information and code your SQL properly.
    Eventually I want to do this in a report. I know
    that this sounds strange but can it be done?Yes, most things are possible.

  • Apply "WHERE CONDITION" in "MASTER/DETAIL FORM" in "ORACLE APEX

    Hi to all respected Gurus of this community.
    I have a problem and I hope that there must be solution in this community and I am not aware of that till now.
    I have a master/detail form in Oracle Application Express. Now, I want to apply a where condition in master-form to filter the data as per requirement but I cannot do so.
    There is an option of "Modify Query" in "Query Definition". According to the instructions I am selecting the desired column (HR_Category) in left and providing text string 'M-9' in the right column to filter the data where HR_Category is M-9, and when I press apply changes, it gives me an error that
    "1 error has occurred
       The condition you are adding has caused the query to be invalid."
    Please help how to proceed to apply a where condition.
    Regards
    Muhammad Uzair Awan
    Oracle APEX Programmer
    Pakistan

    uzairmalik wrote:
    Hi to all respected Gurus of this community.
    I have a problem and I hope that there must be solution in this community and I am not aware of that till now.
    I have a master/detail form in Oracle Application Express. Now, I want to apply a where condition in master-form to filter the data as per requirement but I cannot do so.
    There is an option of "Modify Query" in "Query Definition". According to the instructions I am selecting the desired column (HR_Category) in left and providing text string 'M-9' in the right column to filter the data where HR_Category is M-9, and when I press apply changes, it gives me an error that
    "1 error has occurred
       The condition you are adding has caused the query to be invalid."
    Please help how to proceed to apply a where condition.
    Regards
    Muhammad Uzair Awan
    Oracle APEX Programmer
    Pakistan
    Probably a syntax error.  Check the syntax of the new clause very carefully.
    Can you post the query indicating which predicate is the new one?  If you need to change the column and table names for confidentiality

  • Dynamic Entity Member Lists using UD1 and UD2

    Hello fellow HFM gurus:
    I have created dynamic member lists to get all members of the entity dimension that have a UD1 or UD2 member as specified in the script.
    THe member lists all appear in HFM, but when I try to select them, I get a run-time error. I am trying to select them in the member selection of a data form (in the same drop down with the different system member lists for entiites, like hierarchy, descendants, etc.).
    I believe this is the standard syntax. Please let me know if something is wrong with it.
    ElseIf HS.Dimension = "Entity" Then
    If HS.MemberListID = 1 Then
    ELi=Hs.Entity.List(",")
    For i = Lbound(ELi) to Ubound(ELi)
    If HS.Entity.IsBase("",ELi(i)) = TRUE Then
    If (StrComp(Hs.Entity.UD1(ELi(i)),"DD",vbTextCompare)=0) Then
    Hs.AddEntityToList "",ELi(i)     
    End If
    End If     
    Next
    End if     
    Error in HFM:
    Invalid member selection. Error executing VBScript Microsoft VBScript runtime error, Line 475:Wrong number of arguments or invalid property assignment: 'HS.Entity.List'.Error executing VBScript 0.Error Reference Number: {9A7697E2-75AE-4A06-9A34-B45D58022984};User Name: mark.d.smith@Native DirectoryNum: 0x80042fc2;Type: 1;DTime: 9/10/2012 5:51:16 PM;Svr: VMHODDLPHP4;File: CHsvScriptEngine.cpp;Line: 392;Ver: 11.1.2.1.103.3505;Num: 0x80042fc2;Type: 0;DTime: 9/10/2012 5:51:16 PM;Svr: VMHODDLPHP4;File: CHsvDSMemberLists.cpp;Line: 2722;Ver: 11.1.2.1.103.3505;Num: 0x80042fc2;Type: 0;DTime: 9/10/2012 5:51:16 PM;Svr: VMHODDLPHP4;File: CommonMetadataInternal.cpp;Line: 461;Ver: 11.1.2.1.103.3505;Num: 0x80042fc2;Type: 0;DTime: 9/10/2012 5:51:16 PM;Svr: VMHODDLPHP4;File: CHsvEntities.cpp;Line: 338;Ver: 11.1.2.1.103.3505;Num: 0x80042fc2;Type: 1;DTime: 9/10/2012 5:51:16 PM;Svr: VMHODDLPHP4;File: CCommonDimension.cpp;Line: 1015;Ver: 11.1.2.1.103.3505;

    Hi Mark,
    Please check the double quotes after Entity.List. It should be "","".
    Regards,
    S

  • Outbound merge not working with where conditions in 10g

    Hi,
    These are my database details both remote and local database
    SQL> select * from v$version;
    BANNER
    Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi
    PL/SQL Release 10.2.0.4.0 - Production
    CORE    10.2.0.4.0      Production
    TNS for HPUX: Version 10.2.0.4.0 - Production
    NLSRTL Version 10.2.0.4.0 - ProductionI am doing a merge into a remote database from a local table using below query...
    MERGE into sap_mmd_po_all@cosmic_dev.somedomainname trg using (select * from sap_mmd_cmas_po where upload_flag in ('I','U')) src
      on (trg.PO_NO=src.PO_NO and trg.LINE_DISTRIB_SEQ=src.LINE_DISTRIB_SEQ)
      WHEN MATCHED THEN
        update set
          trg.PO_STATUS_FLG=src.PO_STATUS_FLG,
          trg.SHIP_TO_FACILITY_CD=src.SHIP_TO_FACILITY_CD,
          trg.DELV_TO_PHONE_NO=src.DELV_TO_PHONE_NO,
          trg.DELV_TO_NM=src.DELV_TO_NM,
          trg.DELV_TO_ADDRESS_1=src.DELV_TO_ADDRESS_1,
          trg.PO_ITEM_NO=src.PO_ITEM_NO,
          trg.ITEM_DESCRP=src.ITEM_DESCRP,
          trg.PARTY_NM=src.PARTY_NM,
          trg.VENDOR_ITEM_ID=src.VENDOR_ITEM_ID,
          trg.PO_LN_CRTE_DT=src.PO_LN_CRTE_DT,
          trg.BILL_UOM_CD=src.BILL_UOM_CD,
          trg.COMMODITY_CD=src.COMMODITY_CD,
          trg.COMMODITY_NM=src.COMMODITY_NM,
          trg.BSNSS_UNIT_NO=src.BSNSS_UNIT_NO,
          trg.PO_LN_ORD_QTY=src.PO_LN_ORD_QTY,
          trg.DISTRIB_AMT=src.DISTRIB_AMT,
          trg.PO_LN_DEL_IND=src.PO_LN_DEL_IND,
          trg.PO_DEL_IND=src.PO_DEL_IND,
          trg.PO_TYPE=src.PO_TYPE,
          trg.DOC_DATE=src.DOC_DATE,
          trg.CRTE_DT_TM=src.CRTE_DT_TM,
          trg.UPD_DT_TM=systimestamp,
          trg.SOURCE_SYSTEM=src.SOURCE_SYSTEM,
          trg.PO_LN_LST_CHNGE_DT=src.PO_LN_LST_CHNGE_DT,
          trg.TXJCD=src.TXJCD,
          trg.PLANT=src.PLANT
          where (src.upload_flag='U')--if i remove this then it is working
      WHEN NOT MATCHED THEN
        insert( trg.PO_NO,
                trg.LINE_DISTRIB_SEQ,
                trg.PO_STATUS_FLG,
                trg.SHIP_TO_FACILITY_CD,
                trg.DELV_TO_PHONE_NO,
                trg.DELV_TO_NM,
                trg.DELV_TO_ADDRESS_1,
                trg.PO_ITEM_NO,
                trg.ITEM_DESCRP,
                trg.PARTY_NM,
                trg.VENDOR_ITEM_ID,
                trg.PO_LN_CRTE_DT,
                trg.BILL_UOM_CD,
                trg.COMMODITY_CD,
                trg.COMMODITY_NM,
                trg.BSNSS_UNIT_NO,
                trg.PO_LN_ORD_QTY,
                trg.DISTRIB_AMT,
                trg.PO_LN_DEL_IND,
                trg.PO_DEL_IND,
                trg.PO_TYPE,
                trg.DOC_DATE,
                trg.CRTE_DT_TM,
                trg.UPD_DT_TM,
                trg.SOURCE_SYSTEM,
                trg.PO_LN_LST_CHNGE_DT,
                trg.TXJCD,
                trg.PLANT)
        values( src.PO_NO,
                src.LINE_DISTRIB_SEQ,
                src.PO_STATUS_FLG,
                src.SHIP_TO_FACILITY_CD,
                src.DELV_TO_PHONE_NO,
                src.DELV_TO_NM,
                src.DELV_TO_ADDRESS_1,
                src.PO_ITEM_NO,
                src.ITEM_DESCRP,
                src.PARTY_NM,
                src.VENDOR_ITEM_ID,
                src.PO_LN_CRTE_DT,
                src.BILL_UOM_CD,
                src.COMMODITY_CD,
                src.COMMODITY_NM,
                src.BSNSS_UNIT_NO,
                src.PO_LN_ORD_QTY,
                src.DISTRIB_AMT,
                src.PO_LN_DEL_IND,
                src.PO_DEL_IND,
                src.PO_TYPE,
                src.DOC_DATE,
                systimestamp,
                src.UPD_DT_TM,
                src.SOURCE_SYSTEM,
                src.PO_LN_LST_CHNGE_DT,
                src.TXJCD,
                src.PLANT)
                where src.upload_flag='I'--if i remove this then it is working
                ;And it is throwing an error like...
    SQL Error: ORA-00904: "A3"."UPLOAD_FLAG": invalid identifierBut when I replace the remote table name with local table name then query is functioning fine...
    table structure in local database..
    CREATE TABLE SAP_MMD_CMAS_PO
       (     "PO_NO" VARCHAR2(10 BYTE) NOT NULL ENABLE,
         "LINE_DISTRIB_SEQ" NUMBER NOT NULL ENABLE,
         "PO_STATUS_FLG" VARCHAR2(40 BYTE),
         "SHIP_TO_FACILITY_CD" VARCHAR2(100 BYTE),
         "DELV_TO_PHONE_NO" VARCHAR2(50 BYTE),
         "DELV_TO_NM" VARCHAR2(100 BYTE),
         "DELV_TO_ADDRESS_1" VARCHAR2(1000 BYTE),
         "PO_ITEM_NO" VARCHAR2(100 BYTE),
         "ITEM_DESCRP" VARCHAR2(200 BYTE),
         "PARTY_NM" VARCHAR2(1000 BYTE),
         "VENDOR_ITEM_ID" VARCHAR2(100 BYTE),
         "PO_LN_CRTE_DT" TIMESTAMP (6),
         "BILL_UOM_CD" VARCHAR2(50 BYTE),
         "COMMODITY_CD" VARCHAR2(50 BYTE),
         "COMMODITY_NM" VARCHAR2(50 BYTE),
         "BSNSS_UNIT_NO" VARCHAR2(50 BYTE),
         "PO_LN_ORD_QTY" NUMBER,
         "DISTRIB_AMT" NUMBER,
         "PO_LN_DEL_IND" VARCHAR2(10 BYTE),
         "PO_DEL_IND" VARCHAR2(10 BYTE),
         "PO_TYPE" VARCHAR2(10 BYTE),
         "DOC_DATE" TIMESTAMP (6),
         "CRTE_DT_TM" TIMESTAMP (6),
         "UPD_DT_TM" TIMESTAMP (6),
         "SOURCE_SYSTEM" VARCHAR2(100 BYTE),
         "PO_LN_LST_CHNGE_DT" TIMESTAMP (6),
         "TXJCD" VARCHAR2(50 BYTE),
         "PLANT" VARCHAR2(10 BYTE),
         "UPLOAD_FLAG" VARCHAR2(1 BYTE),
          PRIMARY KEY ("PO_NO", "LINE_DISTRIB_SEQ")
    --table structure in remote database table
    CREATE TABLE SAP_MMD_PO_ALL
       (     "PO_NO" VARCHAR2(10 BYTE) NOT NULL ENABLE,
         "LINE_DISTRIB_SEQ" NUMBER NOT NULL ENABLE,
         "PO_STATUS_FLG" VARCHAR2(40 BYTE),
         "SHIP_TO_FACILITY_CD" VARCHAR2(100 BYTE),
         "DELV_TO_PHONE_NO" VARCHAR2(50 BYTE),
         "DELV_TO_NM" VARCHAR2(100 BYTE),
         "DELV_TO_ADDRESS_1" VARCHAR2(1000 BYTE),
         "PO_ITEM_NO" VARCHAR2(100 BYTE),
         "ITEM_DESCRP" VARCHAR2(200 BYTE),
         "PARTY_NM" VARCHAR2(1000 BYTE),
         "VENDOR_ITEM_ID" VARCHAR2(100 BYTE),
         "PO_LN_CRTE_DT" TIMESTAMP (6),
         "BILL_UOM_CD" VARCHAR2(50 BYTE),
         "COMMODITY_CD" VARCHAR2(50 BYTE),
         "COMMODITY_NM" VARCHAR2(50 BYTE),
         "BSNSS_UNIT_NO" VARCHAR2(50 BYTE),
         "PO_LN_ORD_QTY" NUMBER,
         "DISTRIB_AMT" NUMBER,
         "PO_LN_DEL_IND" VARCHAR2(10 BYTE),
         "PO_DEL_IND" VARCHAR2(10 BYTE),
         "PO_TYPE" VARCHAR2(10 BYTE),
         "DOC_DATE" TIMESTAMP (6),
         "CRTE_DT_TM" TIMESTAMP (6),
         "UPD_DT_TM" TIMESTAMP (6),
         "SOURCE_SYSTEM" VARCHAR2(100 BYTE),
         "PO_LN_LST_CHNGE_DT" TIMESTAMP (6),
         "TXJCD" VARCHAR2(50 BYTE),
         "PLANT" VARCHAR2(10 BYTE),
         "DELETE_FLAG" VARCHAR2(1 BYTE) DEFAULT 'N',
          PRIMARY KEY ("PO_NO", "LINE_DISTRIB_SEQ")
      )It seems to me like a bug, but not quite sure...
    your suggestions are appreciated.
    Thanks,
    Ravi Kumar
    Edited by: ravikumar.sv on Dec 14, 2009 1:31 PM
    Commented the where conditions in merge query

    Hi,
    Yes, i hit the same error....
    SQL> ed
    Wrote file afiedt.buf
      1  merge into hr.test1@test_dblink using test2 on (test1.id = test2.id)
      2  when matched then update set test1.col1=test2.col2 where test2.id=2
      3* when not matched then insert (id, col1) values(test2.id,test2.col2)
    SQL> /
    merge into hr.test1@test_dblink using test2 on (test1.id = test2.id)
    ERROR at line 1:
    ORA-00904: "A3"."ID": invalid identifier
    ORA-02063: preceding line from TEST_DBLINKBUT here is a work around...to add the where condition while joining(ON) itself.
    SQL> ed
    Wrote file afiedt.buf
      1  merge into hr.test1@test_dblink using test2 on (test1.id = test2.id and tes
    t2.id=2)
      2  when matched then update set test1.col1=test2.col2
      3* when not matched then insert (id, col1) values(test2.id,test2.col2)
    SQL> /
    2 rows merged.
    SQL>For you the condition would be...
    on (trg.PO_NO=src.PO_NO and trg.LINE_DISTRIB_SEQ=src.LINE_DISTRIB_SEQ AND src.upload_flag='U')cheers,
    Edited by: Avinash Tripathi on Dec 14, 2009 2:53 PM

  • Where condition in OpenQuery

    Hi All,
    Below is the query to retrieve data from Oracle using linked server. Am unable to user where condition in the select query. Can anyone help on it.
    SELECT * FROM OPENQUERY(<LInkedServerName>, 'select
    user_name as OracleUserName
    ,substr(email_address,1,instr(email_address,''@'')-1) as adloginid
      from applsys.fnd_user where email_address is not null and person_party_id is not null')
    I want to put a condition as "where email_address=<emailaddress>"
    I tried in several ways but getting below error.
    OLE DB provider "OraOLEDB.Oracle" for linked server "" returned message "ORA-00904: "EmailID": invalid identifier".
    Swapna

    Got it using below link
    http://www.experts-exchange.com/Database/MS-SQL-Server/Q_20787790.html
    SELECT
    FROM OPENQUERY(,
    'select user_name as
    OracleUserName ,substr(email_address,1,instr(email_address,''@'')-1) as
    adloginid from applsys.fnd_user')
    where adloginid=N'bturner'<o:p></o:p>
    Thanks
    Swapna

Maybe you are looking for

  • How to delete free goods created in MBN1?

    I dont want the free goods to be automatically populated in ME21N anymore, so which t-code to delete the free goods? Thank you. VT

  • Windows 7 Update Error Code 800706f7

    I am unable to update Windows 7 Home Premium on this machine. Apparently the problem started in Dec. 2014, but I noticed it recently, when I started getting the messages that my Windows copy was not genuine. I have gone through all the suggestions po

  • String CDF functions not working in business rules

    Working with EPM 11.1.2. I created a calc script on the planning cube and it works perfectly. I then put the same code in a business rule and it will not validate. Please see the code below. 1) created udf folder in following directory essbase/Oracle

  • Condition Hiding in CSV Output

    Hi For CSV we dont want to show all the columsn that we use in the pdf and execl outputs so i want to conditionaly and oredr the elements in the csv output is it possible to do. Can you please share the information how to write the logic. Thanks in A

  • My iphone will say sending iMessage and it will never send!!

    my iphone says sending but will never send the message what can I do! when i reset it will work for like and hour maybe two but the goes back to the same! idk what it is maybe my phone number but i dont think so cause it will send Imessages from my i