Dynamic where clause in select query

Hi
I'm trying for a dynamic query and in the dynamic where clause i'm checking a field for constant.....for instance if i wanna to use WERKS EQ '0478' how to declare it in dync where clause. i tried for the following:
SELECT  (TAB_FIELD) INTO TABLE DITAB UP TO 10 ROWS FROM (TAB_NAME) WHERE (CONDI).
heree CONDI = 'werks eq 0287'   . in this case the query fails as the werks shud be equal to '0287' and not just 0287. How to handle this? i tried for the following
CONDI = 'werks eq " '0287' " ' but no luck as it is not a valid stmt as i knew.

hi prabhu,
this is how u select dynamically...
DATA: COND(72) TYPE C,
ITAB LIKE TABLE OF COND.
PARAMETERS: CITY1(10) TYPE C, CITY2(10) TYPE C.
DATA WA TYPE SPFLI-CITYFROM.
CONCATENATE 'CITYFROM = ''' CITY1 '''' INTO COND.
APPEND COND TO ITAB.
CONCATENATE 'OR CITYFROM = ''' CITY2 '''' INTO COND.
APPEND COND TO ITAB.
CONCATENATE 'OR CITYFROM = ''' 'BERLIN' '''' INTO COND.
APPEND COND TO ITAB.
LOOP AT ITAB INTO COND.
WRITE COND.
ENDLOOP.
SKIP.
SELECT CITYFROM
INTO WA
FROM SPFLI
WHERE (ITAB).
WRITE / WA.
ENDSELECT.
regards,
sohi

Similar Messages

  • Regarding  dynamically assigning the where clause to select query

    hi,
      Please send the code regarding how to dynamically assign the where clause to select query.
    thanks in advance

    SELECT <fileds>
            INTO TABLE itab
            FROM dbase
            WHERE  condition.

  • Dynamic where clause in my query

    I am using a view
    select * from vw_pt_inv_customer
    My requirement is have a web page where users can search for customers by filling in a form which has the following feilds: - User can fill in the form with all the feilds or not. I want a dynamic where clause.. how can i get this work for me?
    Title
    Firstname
    Surname
    Address1
    Address2
    Postcode
    Telephone No

    879796 wrote:
    I am using a view
    select * from vw_pt_inv_customer
    My requirement is have a web page What web frame work is used? Apex? Something else?
    where users can search for customers by filling in a form which has the following feilds: - User can fill in the form with all the feilds or not. I want a dynamic where clause.. how can i get this work for me?Dynamic where clauses are a Very Bad Idea (tm).
    And having an open ended search function on a web page is also not a great idea.
    If you are using Apex, the for performance (and even query flexibility) it will be better creating a separate reporting region for each unique query. A boolean rendering condition checks the existing bind variables in order to determine if that specific reporting region should be executed.
    This results in a reporting region having a proper and dedicated SQL query (no hacking of the where clause) and that region only being rendered for the proper combination of supplied filter criteria.
    A slightly more complex, but more flexible approach, is using a generic reporting region that calls a PL/SQL function that creates returns the SQL query for execution and rendering. The approach to this is very similar to constructing a SQL ref cursor (dynamically) for a client. The only difference is that instead of creating the actual ref cursor, the code simply needs to return the SQL source code statement - with bind variables. The Apex run-time does the rest (does the binds and execution and rendering).
    If you are not using Apex - you should still consider these approaches. And not hacking a single SQL to cater for all different types of filter conditions.

  • How to create VO with multiple dynamic where clauses on select with UNION?

    I am trying to implement the View Object for the UNION query that looks like this:
         select a,b,c...
              from t1,t2,...
              where dynamic_where_clause1     
         union all
         select a,b,c,...
              from t11,t12, ...
              where dynamic_where_clause2
    There are up to 60 input parameters that are used to generate dynamic where clauses. They are actually created by calling PL SQL function.
    So far, I was not able to assign both where clauses to the view object. Is there a workable solution for this problem, besides resorting to programmatic View Object?
    I understand that recommended way with UNIONs is to wrap both queries into a parent select:
    select * from (
         select a,b,c...
              from t1,t2,...
              where ... -- table relationship joints
         union all
         select a,b,c,...
              from t11,t12, ...
              where ... -- table relationship joints
    ) QRSLT
         where dynamic_where_clause
    Unfortunately this approach doesn't work here, since individual selects are producing unmanageable amount of data and resulting query takes forever to complete.

    I afraid I would not have any real benefits from using VO if I replace the entire query with every request. Actually, the performance may suffer.
    I solved the problem by creating a POJO Data Control and invoking the custom select query from java. Not sure if it is the best approach to the problem, but implementation time is limited and it works.
    Actually, this is not the first time I see the need to implement VO with complicated SQL like select with unions and dynamic pieces. It would be nice to find a solution and not resort to workarounds.
    Edited by: viksicom on Aug 2, 2012 8:48 AM

  • Dynamic WHERE clause in SELECT statement

    Hi,
    I need to extract (SELECT) all the products in different salesorganizations. Since a product can be available in more than 1 salesorg I have created several properties in the PRODUCT dimension - 1 for each salesorganization (naming: Sxxxx where xxxx is the salesorganization number).
    Since I need to prefix the salesorganization property with an "S" I have created a property on the SALESORG dimension called SALESORG.
    Therefore I need to create a dynamic WHERE clause in the SELECT statement. Currently my script is:
    *SELECT(%SORG%, "[SALESORG]",SALESORG, [ID]=%SALESORG_SET%)
    *SELECT(%PROD%, "[ID]",PRODUCT, [%SORG%]="X")
    My first SELECT find the Sxxx (equal to the property I need in the PRODUCT dimension). My second SELECT uses the variable in the first SELCT statement to use the correct property for the WHERE clause.
    Unfortunately the code is not validated - any suggestions?
    /Lars

    Hi Lars,
    If you run it from a DM package without validating it, does it still work? I would bet it does.
    If this is the case I would open a message with SAP (it would be an enhancement request). Until they fix the validation code, you would just have to live with the script not validating.
    Cheers,
    Ethan

  • ADF dynamic where clause for VO query using BC

    I'm hoping someone can help me out. I have a read only view object that I want to filter results based on some user choices. For example the user may want to see all results or they may only want to see a much smaller subset. This is for an error dashboard, the smaller subset maybe by application or maybe by application and by error severity. I think I can use a dynamic where clause but I'm not sure, Can someone get me started down the right path, or post an example that I can see.

    Hi user,
    You can use a dynamic where clause for this, but maybe there is a more practical option. Maybe you can have a fixed where clause, but using a bind parameter, like:
    vo.application like :applicationParam. This makes an executeWithParams method available that you can call from your page, and use in the bindings. This parameter you can populate with the results of for example a poplist, with a default value of '%'.
    When you do want to use a dynamic where clause, you will need to add a method to the java code of your application module, and make this method available for the client. In this method, you can use findViewObject to retrieve your VO, use VO.setWhereClause to set the whereclause to what you want, and then call VO.executeQuery. This method can then again be called from the page.
    Success,
    Jeroen van Veldhuizen

  • How to dynamically add field name in where clause of select query in web dynpro?

    Hello,
    Can any body tell me how i can use select query with dynamic wheere condition.
    i have a requirement like there are multiple input fields  and i want to select data from two database
    and condition may vary .

    Hi
    In the where clause you need to write like
    WHERE NAME LIKE 'DE%'
    Regards
    Sudheer

  • How to use string operation in where clause of select query

    Hello All,
    I just want to know how can i write a restriction in select query saying retrive data only begins with name "DE*".
    Explaination: If my table has records and names starts with character then i want to write a query to fetch all the records in which names starts with DE*.
    Thanks in advance for your quick reply...
    Dev.

    Hi
    In the where clause you need to write like
    WHERE NAME LIKE 'DE%'
    Regards
    Sudheer

  • Dynamic Where Clause in select using member attribute of class

    Hello,
    can anybody provide me some tips how to solve this problem:
              SELECT (lv_sql_select) INTO CORRESPONDING FIELDS OF TABLE lt_cntrl2
                         FROM (lv_db_name)
                     FOR ALL ENTRIES IN mt_guids
                 WHERE (lv_sql_where).
    works perfectly fine if I use a local table variable or a member of my class. But if I build my where clause using a member attribute of my class which comes from the interace- exactly the same type and data as before I get a dump.
    SELECT (lv_sql_select) INTO CORRESPONDING FIELDS OF TABLE lt_xyz
                         FROM (lv_db_name)
                     FOR ALL ENTRIES IN if_abc~mt_guids
    my where clause "guid = if_abc~mt_guids-guid.
    Dump:
    Error analysis
        An exception occurred that is explained in detail below.
        The exception, which is assigned to class 'CX_SY_DYNAMIC_OSQL_SEMANTICS', was
         not caught in
        procedure "....GET_DATA" "(METHOD)", nor was it propagated
         by a RAISING clause.
        Since the caller of the procedure could not have anticipated that the
        exception would occur, the current program is terminated.
        The reason for the exception is:
        Das laufende ABAP-Programm wollte eine Open SQL-Anweisung ausführen,
        die eine dynamische Angabe enthält. Der Parser lieferte jedoch den
        Fehler: "Wrong table name or table alias name table alias name
         table alias name "....". table alias name
         "...". table alias name "...". t"

    Hi Marco Freischlag,
      As per my understanding , if we give for all entries we want to use internal table ,  For where conditions you want to pass variable , not internal table one filed,because it will not have header line...
    so code like this...
    SELECT (lv_sql_select) INTO CORRESPONDING FIELDS OF TABLE lt_xyz
                         FROM (lv_db_name)
                     FOR ALL ENTRIES IN if_abc~mt_guids
              where guid = if_abc~mt_guids-guid. " Here pass some variable or work area in it and test.
    Thanks,
    Vijay SR

  • How to formulate where clause in select query at runtime..??

    I am facing a problem..
    I have to generate a select query during runtime..For Ex: when user selects a row in an alv report, particular date field is to be read and another report is to be opened for that data..
    I know how to make drill down report but my problem is concatenating  date field...
    Plz tell a solution....

    Hi,
    Try like this....
    refresh : gt_tvarvc_temp[].                                       
      gt_tvarvc_temp[] = lt_tvarvc[].                                   
          loop at gt_tvarvc_temp into gs_tvarvc_temp
                                  where name = 'CREDIT_MEMO_DOC_TYPE'.  
            r_blart-sign = gs_tvarvc_temp-sign.                         
            r_blart-option = gs_tvarvc_temp-opti.                      
            r_blart-low = gs_tvarvc_temp-low.                           
            append r_blart.                                            
            clear r_blart.                                             
          endloop.                                                     
          concatenate 'BLART IN ' 'r_blart' into lv_condition
          separated by space.
    if not lv_customer_cond is initial.
          if lv_condition is initial.
            concatenate lv_customer_cond lv_condition
                into lv_condition separated by space.
          else.
            concatenate lv_condition 'AND' lv_customer_cond
                into lv_condition separated by space.
          endif.
        endif.
    select bukrs belnr gjahr appending corresponding fields        
                                        of table lt_potential_credits
                                        from bsid
                                        where (lv_condition).
    Hope its helps

  • Bind variable error while adding dynamic where clause to VO query

    hi
    i have extended a VO and in the VOImpl i have written the following code
    public class HzPuiClassificationListVOExImpl extends HzPuiClassificationListVOImpl
    public void initQuery(String partyId, String s1, String classCode)
    /* Logging Code*/
    if(this.isLoggingEnabled(OAFwkConstants.PROCEDURE))
    {this.writeDiagnostics(this," > initQuery() , partyId ="+partyId+" , s1 ="+s1+", classCode="+classCode,OAFwkConstants.PROCEDURE);}
    setWhereClauseParams(null);
    setWhereClauseParam(0, classCode);
    setWhereClauseParam(1, classCode);
    setWhereClauseParam(2, partyId);
    String query = super.getQuery();
    * Check if the whereClause is already present
    if(query!=null && query.toUpperCase().indexOf("AAAAA") == -1)
    OAApplicationModule am = (OAApplicationModule)this.getApplicationModule();
    OADBTransaction oadbTxn = am.getOADBTransaction();
    String whereClause = "   class_category IN ("+
    *" SELECT flv.lookup_code"+*
    *" FROM fnd_lookup_values flv, fnd_lookup_values_dfv dfv"+*
    *" WHERE flv.rowid = dfv.row_id"+*
    *" AND flv.lookup_type = 'XXXXX'"+*
    *" AND dfv.context_value = flv.lookup_type"+*
    *" AND dfv.oco_enabled = 'Y' "+*
    this.addWhereClause(whereClause);
    this.executeQuery();
    * This is the default constructor (do not remove)
    public HzPuiClassificationListVOExImpl()
    when i run the page i get this error
    java.sql.SQLException: Missing IN or OUT parameter at index:: 2
    the original vo query below has 3 bind variables
    SELECT *
    FROM (SELECT *
    FROM (SELECT cc.class_category
    ,l.meaning
    FROM hz_class_categories cc
    ,fnd_lookup_types_vl l
    WHERE cc.class_category = l.lookup_type
    AND l.view_application_id = 222
    AND EXISTS (
    SELECT NULL
    FROM hz_code_assignments ca
    WHERE ca.owner_table_name = 'HZ_CLASS_CATEGORIES'
    AND ca.owner_table_id IS NULL
    AND ca.owner_table_key_1 = cc.class_category
    AND ca.class_category = 'CLASS_CATEGORY_GROUP'
    AND ca.class_code = :1
    AND NVL (ca.status, 'A') = 'A'
    AND SYSDATE BETWEEN ca.start_date_active AND NVL (ca.end_date_active, SYSDATE + 1))
    UNION ALL
    SELECT cc.class_category
    ,l.meaning
    FROM hz_class_categories cc
    ,fnd_lookup_types_vl l
    WHERE cc.class_category = l.lookup_type
    AND l.view_application_id = 222
    AND 'INDUSTRIAL_GROUP' <> :2
    AND NOT EXISTS (
    SELECT NULL
    FROM hz_code_assignments ca
    WHERE ca.owner_table_name = 'HZ_CLASS_CATEGORIES'
    AND ca.owner_table_id IS NULL
    AND ca.owner_table_key_1 = cc.class_category
    AND ca.class_category = 'CLASS_CATEGORY_GROUP'
    AND NVL (ca.status, 'A') = 'A'
    AND SYSDATE BETWEEN ca.start_date_active AND NVL (ca.end_date_active, SYSDATE + 1))
    AND hz_classification_v2pub.is_valid_category ('HZ_PARTIES'
    ,cc.class_category
    ,:3) = 'T') a
    WHERE EXISTS (
    SELECT NULL
    FROM hz_class_code_denorm
    WHERE class_category = a.class_category
    AND TRUNC (SYSDATE) BETWEEN NVL (start_date_active, TRUNC (SYSDATE)) AND NVL (end_date_active, TRUNC (SYSDATE))
    AND enabled_flag = 'Y'
    AND LANGUAGE = USERENV ('LANG'))) qrslt
    A similar error was discussed at this link but it did not give final solution
    [http://kr.forums.oracle.com/forums/thread.jspa?threadID=618451]
    help me to solve this issue..
    Thanks,
    Varun
    Edited by: user10707840 on May 19, 2009 7:18 AM

    its not the AM code .. its the code in VOImpl...
    the same code is working in 11i but when its migrated to R12 its giving this error..
    The original seeded VO query in 11i contains the same bind variable :1 at three places
    SELECT * FROM (select class_category, meaning from hz_class_categories, fnd_lookup_types_vl l where hz_class_categories.class_category = l.lookup_type and l.view_application_id = 222 and class_category in (select owner_table_key_1 from hz_code_assignments ca where ca.owner_table_name = 'HZ_CLASS_CATEGORIES' and ca.owner_table_id is null and ca.class_category = 'CLASS_CATEGORY_GROUP' and ca.class_code = :1 and nvl(ca.status, 'A') = 'A' and sysdate between ca.start_date_active and nvl(ca.end_date_active, sysdate+1)) union all select cc.class_category , meaning from hz_class_categories cc, fnd_lookup_types_vl l, hz_class_category_uses cu where cc.CLASS_CATEGORY = cu.class_category AND ( UPPER(CU.ADDITIONAL_WHERE_CLAUSE) LIKE decode(:1, 'ORG_GROUP','%PARTY_TYPE%ORGANIZATION%', 'PERSON_GROUP', '%PARTY_TYPE%PERSON%', '%') or CU.ADDITIONAL_WHERE_CLAUSE IS NULL or UPPER(CU.ADDITIONAL_WHERE_CLAUSE) LIKE '%WHERE 1=1%' ) and cu.owner_table = 'HZ_PARTIES' and cc.class_category = l.lookup_type and l.view_application_id = 222 and cc.class_category not in (select owner_table_key_1 from hz_code_assignments hca where hca.owner_table_name = 'HZ_CLASS_CATEGORIES' and hca.owner_table_id is null and hca.class_category = 'CLASS_CATEGORY_GROUP' and nvl(hca.status, 'A') = 'A' and sysdate between hca.start_date_active and nvl(hca.end_date_active, sysdate+1)) and cc.class_category not in ( 'RELATIONSHIP_TYPE_GROUP', 'CLASS_CATEGORY_GROUP') and 'INDUSTRIAL_GROUP' <> :1) QRSLT ORDER BY meaning
    the code working in 11i had only one setWhereClauseParam line i.e. setWhereClauseParam(0, classCode);
    when i ran the same code in R12 it errd out..
    I checked the original R12 query... it has 3 bind variables :1 , :2 and :3 ... so i added 2 more setWhereClauseParam statements
    setWhereClauseParam(1, classCode);
    setWhereClauseParam(2, partyId);
    but still its giving the same error
    ORIGINAL R12 query already posted above...

  • What value we need to pass as parameter in where clause in select query

    Hi ALL,
    I have written following query, it was executing fine and returning me all the rows with search criteria.
    SELECT *
    FROM
    PRTY_RQST PR
    JOIN BUSN_APPLC BIAP ON BIAP.BUSN_APPLC_ID = PR.BUSN_APPLC_ID
    JOIN INTN_STATS INSTS ON INSTS.INTN_STATS_ID = PR.INTN_STATS_ID
    JOIN INTN_PROCES_TYP INTPTY ON INTPTY.INTN_PROCES_TYP_ID = PR.INTN_PROCES_TYP_ID
    LEFT JOIN RQST_TYP RQSTYP ON RQSTYP.RQST_TYP_ID = PR.RQST_TYP_ID
    JOIN ADDTN_RQST_INFO ADTINF ON PR.PRTY_RQST_ID = ADTINF.PRTY_RQST_ID
    JOIN ADDTN_INFO_KEY_TYP ADDKEY ON ADTINF.ADDTN_INFO_KEY_TYP_ID = ADDKEY.ADDTN_INFO_KEY_TYP_ID
    JOIN PRTY_KEY PRTKEY ON PR.PRTY_RQST_ID = PRTKEY.PRTY_RQST_ID
    JOIN PRTY_KEY_TYP PRKYTP ON PRTKEY.PRTY_KEY_TYP_ID = PRKYTP.PRTY_KEY_TYP_ID
    WHERE (BIAP.BUSN_APPLC_NM = 'bpel')
    AND (INTPTY.INTN_PROCES_TYP_NM = 'FulfillmentOrder')
    AND (PR.UPDT_BY = 'update3')
    AND (INSTS.INTN_STATS_NM = 'Submitted')
    AND (PR.CHLD_RQST_IND = 'N')
    AND (PR.TRACK_RQST_IND = 'Y')
    AND (RQSTYP.RQST_TYP_NM = 'PensionPortfolioRebalance')
    AND (RQSTYP.RQST_CLASS_NM = 'Composite')
    AND (PRKYTP.PRTY_KEY_TYP_NM = 'NPIN')
    AND (PRTKEY.PRTY_TYP_VAL = '101101' )
    AND (ADDKEY.ADDTN_INFO_KEY_TYP_NM = 'PlanNumber')
    AND (ADTINF.ADDTN_RQST_TYP_VALUE = 'TBMBUpdated');
    My question here is i don't want pass the value for BIAP.BUSN_APPLC_NM, still want to get the values for remaing conditions. what value i need to pass here.
    I tried Null it giving me no rows. can some one help me on this.
    Thank you in advance.
    Vijay

    933325 wrote:
    thank you,
    since it is search criteria. I have to use OR instead of AND. this resolved my problem.
    SELECT *
    FROM
    PRTY_RQST PR
    JOIN BUSN_APPLC BIAP ON BIAP.BUSN_APPLC_ID = PR.BUSN_APPLC_ID
    JOIN INTN_STATS INSTS ON INSTS.INTN_STATS_ID = PR.INTN_STATS_ID
    JOIN INTN_PROCES_TYP INTPTY ON INTPTY.INTN_PROCES_TYP_ID = PR.INTN_PROCES_TYP_ID
    LEFT JOIN RQST_TYP RQSTYP ON RQSTYP.RQST_TYP_ID = PR.RQST_TYP_ID
    JOIN ADDTN_RQST_INFO ADTINF ON PR.PRTY_RQST_ID = ADTINF.PRTY_RQST_ID
    JOIN ADDTN_INFO_KEY_TYP ADDKEY ON ADTINF.ADDTN_INFO_KEY_TYP_ID = ADDKEY.ADDTN_INFO_KEY_TYP_ID
    JOIN PRTY_KEY PRTKEY ON PR.PRTY_RQST_ID = PRTKEY.PRTY_RQST_ID
    JOIN PRTY_KEY_TYP PRKYTP ON PRTKEY.PRTY_KEY_TYP_ID = PRKYTP.PRTY_KEY_TYP_ID
    WHERE (BIAP.BUSN_APPLC_NM = null )
    OR (INTPTY.INTN_PROCES_TYP_NM = 'FulfillmentOrder')
    OR (PR.UPDT_BY = 'update3')
    OR (INSTS.INTN_STATS_NM = 'Submitted')
    OR (PR.CHLD_RQST_IND = 'N')
    OR (PR.TRACK_RQST_IND = 'Y')
    OR (RQSTYP.RQST_TYP_NM = 'PensionPortfolioRebalance')
    OR (RQSTYP.RQST_CLASS_NM = 'Composite')
    OR (PRKYTP.PRTY_KEY_TYP_NM = 'NPIN')
    OR (PRTKEY.PRTY_TYP_VAL = '101101' )
    OR (ADDKEY.ADDTN_INFO_KEY_TYP_NM = 'PlanNumber')
    OR (ADTINF.ADDTN_RQST_TYP_VALUE = 'TBMBUpdated');
    AND (ADTINF.ADDTN_RQST_TYP_VAL_DT ='06-JUN-12 04.18.56.000000000 PM')
    AND (ADTINF.ADDTN_RQST_TYP_VAL_NUM ='123123') ;
    once again thank you all.But that's a completely different query than what was in the original post

  • Where clause in select query

    Hi Experts,
    I want to fetch data from PAYR table where ZALDT date falls in the date range(s_date) or VOIDD date falls in the date range.
    Which one is correct?
    SELECT ZBUKR
                 CHECT 
                ZALDT
                VOIDD
    into table T_PAYR
    from PAYR
    where CHECT in s_chect
        and ZALDT in s_date
          or VOIDD in s_date.
          OR
    SELECT ZBUKR
                 CHECT 
                ZALDT
                VOIDD
    into table T_PAYR
    from PAYR
    where CHECT in s_chect
        and ( ZALDT in s_date or VOIDD in s_date ).
    Regards,
    Sangeeta.

    hi,
    Second one is correct
    Issue resolved,please close the thread.
    Thnks
    Sahil

  • How to add a dynamic where clause for a sql based VO with group by query?

    Hi,
    Here is my case, I have a sql query based VO with the query like "select status, count(*) StatusCount from my_table group by status". Now I used the following java code trying to dynamically add the where clause to my VO to filter the rows based the type attribute in my DB table.
    vo.setWhereClause("type='MyType1' ");
    vo.executeQuery();
    Then I got the sql syntax error. Looks like the ADF has added the where clause to the end of my sql so my sql becomes "select status, count(*) StatusCount from my_table group by status where type='MyType1' ". But what I expected was the correct syntax "select status, count(*) StatusCount from my_table where type='MyType1' group by status".
    Does anyone know if this is an ADF bug? Or is there any other way to achieve my goal?
    Thanks,
    Chunyang
    Edited by: Chunyang on Dec 13, 2012 9:09 PM

    Hi,
    When you use setWhereClause on the VO, it is applied on top of the VO query. I.e, assume your VO has the following query.
    select empno, ename from empNow, if you apply the where clause programatically, only the two attributes that you are using in the select statement could be used. I.e
    select * from (select empno, ename from emp) where ename='KING' - VALID
    select * from (select empno, ename from emp) where deptno=10  - INVALID (because the inner query - the one you've defined as query for your vo does not have deptno attribute selected)If you would need to set a dynamic where clause, you need to make them available in your select statement / use bind variables.
    -Arun

  • Data Services Designer Query tranform dynamic where clause or another way

    I have an XML source that has 5 fields.  These fields are used to query 4 different SQL table data sources and do an AND inthe where clause of a query transform.  Works well if all 5 fields in the xml have data.  If one (or more) are blank, then it runs the where checking for blank matches and gives no results.  What I want to do is if a field is blank, do not use it in the where clause.  Could this be an outer join setup?  Issue is that if there is a PhoneNumber input, then to be considered a result, there must be a PhoneNumber match on potential result records...

    I have an XML source that has 5 fields.  These fields are used to query 4 different SQL table data sources and do an AND inthe where clause of a query transform.  Works well if all 5 fields in the xml have data.  If one (or more) are blank, then it runs the where checking for blank matches and gives no results.  What I want to do is if a field is blank, do not use it in the where clause.  Could this be an outer join setup?  Issue is that if there is a PhoneNumber input, then to be considered a result, there must be a PhoneNumber match on potential result records...

Maybe you are looking for

  • Bapi for Purchasing Info Record

    Hi, Is there any Bapi for creating Purchasing Info Record, Transaction code ME11. How do we generally go about it. -Thanks, Sneha.

  • Sale order reflecting in production order

    Hai All, I have following scenario. I have two plants A and B.  A is depo and B is manufacturing plant. product  after manufacturing is transferred from manufacturing plant ( B) to Depo ( A) through stock transport order. Now sales order is placed on

  • Do we need to install microsoft cluster software for RAC 10G

    Hi all, Our company wants to install ORACLE 10G RAC on windows 2003 R2. Based on the pre-requisites I asked network guys to provide me the shared disk storage from SAN, but they insist that this storage will not be accessible until we have windows cl

  • Internal server error when accessing portal

    Oracle 9i As Portal was successfully installed and configured. pages, applications, components, etc were created and it was workinf fine.The problem arose when a servlet program was written using JPDK and accessed at http://domainname/servlet/name .

  • Issue with schema publishing after installing Universal Records Management

    Installing URM over Content Server has been by far the most random experience I've had so far with any technology... Out of 6 installation attemts of URM, only 1 has been entirely successful.... with no errors.... the rest have errors that makes it i