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

Similar Messages

  • Dynamic where clause for MULTIPLE values

    In the following of dynamic where clause?
    i have some somewhat different problem.
    Is a dynamic where clause for multiple values possible?
    If the inputvariable varCode1,varCode2,varCode3,varCode4 are 0 then show all id's otherwise filter the resultset on var1 and/or var2,and/or var3,and/or var4.
    Example table:
    create table t
    (d int,var int);
    insert into t values (1 ,1 );
    insert into t values (2 ,1 );
    insert into t values (3 ,2 );
    insert into t values (4 ,3 );
    insert into t values (5 ,4 );
    insert into t values (6 ,4 );
    insert into t values (7 ,4 );
    insert into t values (8 ,4 );
    insert into t values (9 ,5 );
    insert into t values (10, 6);
    insert into t values (11, 6);
    So what i want to change the where clause upon the value of the varCodes. If var1 and var are not 0 a "AND" should be used otherwise an "OR"
    select id
    from tst
    where var = DECODE( :varCode1, 0, var, :varCode1)
    or/and(?) DECODE( :varCode2, 0, var, :varCode2)
    or DECODE( :varCode3, 0, var, :varCode3)
    or DECODE( :varCode4, 0, var, :varCode4)

    Please turn off your Caps Lock
    and try this link
    Dynamic WHERE clause

  • 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

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

  • 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

  • Dynamic where clause for generated reports (designer 6.0)

    Hi,
    I'd like to include dynamic where clause into my reports. It's easy with report builder by using bind parameter in a query where clause (&param where param is a parameter in which you fill a VARACHAR2 to complete default where clause).
    Problem with designer 6.0 report generator is that he failed while trying to parse the query statement he contructs if there is a bind parameter within.
    How can I manage this problem ?
    Thanks for answers
    Romain

    Hi Divya,
         SET_REPORT_OBJECT_PROPERTY(repid,REPORT_OTHER,'paramform=no P_WHERE_CLAUSE= '||Where_Clause);Instead of using SET_REPORT_OBJECT_PROPERTY built in try using ADD_PARAMETER built in which
    adds parameters to a parameter list. Each parameter consists of a key, its type, and an associated value.
    v_rep := RUN_REPORT_OBJECT(repid); and instead of using RUN_REPORT_OBJECT try using RUN_PRODUCT.
    DECLARE
         repid REPORT_OBJECT;
         v_rep  VARCHAR2(100);
         Where_Clause Varchar2(4000) := null ;
            *Pl_Id        ParamList;*
            *Pl_Name      VARCHAR2(10) := 'param_list';*
    BEGIN
         Where_Clause := 'Where '||Create_Where_Clause();
         message(Where_Clause);
         message(' ');
            pl_id := Get_Parameter_List(pl_name);
            IF not Id_Null(pl_id) THEN
               Destroy_Parameter_List(pl_id);
            END IF;
            pl_id := Create_Parameter_List(pl_name);
            Add_Parameter(pl_id,'P_WHERE_CLAUSE', TEXT_PARAMETER, WHERE_CLAUSE);
            Add_Parameter(pl_id,'PARAMFORM',TEXT_PARAMETER,'NO');
    --      Add_Parameter(pl_id,'ANY_OTHER_PARAMETER', TEXT_PARAMETER, 'VALUE FOR OTHER PARAMETER');
            RUN_PRODUCT(REPORTS,'REPORT_NAME', ASYNCHRONOUS, RUNTIME, FILESYSTEM, pl_id, NULL);
    END;Also you can add as many User created or System parameters as you want using add_parameter. Updated the code to add PARAMFORM parameter.
    Best Regards
    Arif Khadas
    Edited by: Arif Khadas on Mar 15, 2011 9:31 AM

  • Dynamic where clause for cursor

    Hi Friends,
    I have a stored procedure with a single input parameter where in the input comes as
    a string of values (ex: EMPLOYEE NAMES) separated by commas. I use this parameter in my cursor query
    and my requirement is like when the parameter is NULL the query has to run for ALL the employees but if
    its not, it has to run for the EMPLOYEE NAMES passed as the input parameter.
    What are the possible and apt solutions for this requirement ?
    Should I go for dynamic sql or do I have any other optimal solutions?
    Please advice me.
    Thanks
    Zara

    Dear,
    I have a stored procedure with a single input parameter where in the input comes as
    a string of values (ex: *EMPLOYEE NAMES*) separated by commas. I use this parameter in my cursor query
    and my requirement is like when the parameter is NULL the query has to run for ALL the employees but if
    its not, it has to run for the EMPLOYEE NAMES passed as the input parameter.
    What are the possible and apt solutions for this requirement ?
    Should I go for dynamic sql or do I have any other optimal solutions?
    Please advice me.I would suggest you to let down this dynamic SQL and those concatenations that are going to introduce a threat of SQL injection and non shared code into your application.
    And, as far as you've opted for a stored procedure I want to suggest you to use
    (a) stored procedure in wich only static SQL is used
    (b) if point (a) is respected then you don't have to care about using litteral inside your stored procedure. All what you will do in this procedure will be 'auto-binded'; that is PL/SQL (static).
    (c) However, make sure to call your stored procedure using bind variables; otherwise your shared pool (v$sql) will be full of hundred and thousands of calls to your stored procedure.
    Best Regards
    Mohamed Houri

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

  • Dynamic Where clause in 4.6C [Literals allowed but not variables]

    Good afternoon-
    We have a dynamic select statement that works perfectly in 4.7 ext 2, but is causing a short dump in 4.6C. The error in the short dump says:
    The current ABAP/4 program attempted to execute an ABAP/4 Open SQL       
    statement containing a WHERE condition of the form WHERE (itab) or       
    WHERE ... AND (itab). The part of the WHERE condition specified at       
    runtime in the internal table itab contains an invalid                   
    value "HDR_COMP_CODE". Literals are allowed as values, but not variables.
    HDR_COMP_CODE is in incoming parameter to the function module that is calling this code. It is of type BKPF-BUKRS.
    Here is the code:
    DATA: BEGIN OF L_WHERE_CLAUSE OCCURS 0,
            TEXT_LINE(60) TYPE C,
      END OF L_WHERE_CLAUSE.
      CLEAR L_WHERE_CLAUSE.
      IF NOT HDR_COMP_CODE IS INITIAL.
        SELECT SINGLE KTOPL
        INTO LV_KTOPL
        FROM T001
        WHERE BUKRS = HDR_COMP_CODE.
        L_WHERE_CLAUSE = 'B~BUKRS = HDR_COMP_CODE'.
        APPEND L_WHERE_CLAUSE.
        CLEAR  L_WHERE_CLAUSE.
        L_WHERE_CLAUSE = 'AND'.
        APPEND L_WHERE_CLAUSE.
        CLEAR  L_WHERE_CLAUSE.
        L_WHERE_CLAUSE = 'T~KTOPL = LV_KTOPL'.
        APPEND L_WHERE_CLAUSE.
        CLEAR  L_WHERE_CLAUSE.
        L_WHERE_CLAUSE = 'AND'.
        APPEND L_WHERE_CLAUSE.
        CLEAR  L_WHERE_CLAUSE.
      ENDIF.
      L_WHERE_CLAUSE = 'T~SPRAS = SY-LANGU'.
      APPEND L_WHERE_CLAUSE.
      CLEAR  L_WHERE_CLAUSE.
      SELECT BSAKNR TTXT50
      INTO (LT_GL_ACCOUNT_DATA-GL_ACCOUNT, LT_GL_ACCOUNT_DATA-DESCRIPTION)
      FROM  SKB1 AS B INNER JOIN SKAT AS T
         ON TSAKNR = BSAKNR
      WHERE (L_WHERE_CLAUSE).
        APPEND LT_GL_ACCOUNT_DATA.
        CLEAR  LT_GL_ACCOUNT_DATA.
      ENDSELECT.
    This EXACT query works in 4.7, has anyone run into this, or can they tell me why I might be getting the error?
    Thanks,
    Andy

    Well, in this case, unless I'm missing something,  you do not requre a dynamic WHERE clause.  You can use RANGES instead.
    report zrich_0001.
    *DATA: BEGIN OF L_WHERE_CLAUSE OCCURS 0,
    *TEXT_LINE(60) TYPE C,
    *END OF L_WHERE_CLAUSE.
    ranges: r_bukrs for t001-bukrs.
    ranges: r_ktopl for t001-ktopl.
    *CLEAR L_WHERE_CLAUSE.
    IF NOT HDR_COMP_CODE IS INITIAL.
    clear r_bukrs. refresh r_bukrs.
    r_bukrs-sign = 'I'.
    r_bukrs-option = 'EQ'.
    r_bukrs-low = hdr_comp_code.
    append r_bukrs.
    SELECT SINGLE KTOPL
    INTO LV_KTOPL
    FROM T001
    WHERE BUKRS = HDR_COMP_CODE.
    clear r_ktopl. refresh r_ktopl.
    r_ktopl-sign = 'I'.
    r_ktopl-option = 'EQ'.
    r_ktopl-low = lv_ktopl.
    append r_ktopl.
    *L_WHERE_CLAUSE = 'B~BUKRS = HDR_COMP_CODE'.
    *APPEND L_WHERE_CLAUSE.
    *CLEAR L_WHERE_CLAUSE.
    *L_WHERE_CLAUSE = 'AND'.
    *APPEND L_WHERE_CLAUSE.
    *CLEAR L_WHERE_CLAUSE.
    *L_WHERE_CLAUSE = 'T~KTOPL = LV_KTOPL'.
    *APPEND L_WHERE_CLAUSE.
    *CLEAR L_WHERE_CLAUSE.
    *L_WHERE_CLAUSE = 'AND'.
    *APPEND L_WHERE_CLAUSE.
    *CLEAR L_WHERE_CLAUSE.
    ENDIF.
    *L_WHERE_CLAUSE = 'T~SPRAS = SY-LANGU'.
    *APPEND L_WHERE_CLAUSE.
    *CLEAR L_WHERE_CLAUSE.
    SELECT B~SAKNR T~TXT50
    INTO (LT_GL_ACCOUNT_DATA-GL_ACCOUNT, LT_GL_ACCOUNT_DATA-DESCRIPTION)
    FROM SKB1 AS B INNER JOIN SKAT AS T
    ON T~SAKNR = B~SAKNR
    WHERE  b~bukrs in r_bukrs
      and  t~ktopl in r_ktopl.
    APPEND LT_GL_ACCOUNT_DATA.
    CLEAR LT_GL_ACCOUNT_DATA.
    ENDSELECT.
    Regards,
    Rich Heilman

  • Where clause for TaskLOVVO on OTL Timecard

    Hi,
    Following is the customization on our OTL timecard layout(Projects and Payroll Layout):
    ->Extended TaskLOVVO and based on a value selected in TaskLOV, i am defaulting Hours type.
    The dynamic where clause for the TaskLOVO is taken care of by the below QUALIFIER_ATTRIBUTES(Same as seeded layout)
    QUALIFIER_ATTRIBUTE14 = "HxcCuiTaskProjectId|PROJECT|Y#HxcCuiTaskProjectNumber|PROJECT-DISPLAY|Y"
    QUALIFIER_ATTRIBUTE15 = "project_id = ::HxcCuiTaskProjectId#upper(project_number) = upper(::HxcCuiTaskProjectNumber)"
    But in some scenarios the dynamic layout is not getting appended to TaskLOVO and the query behind the TaskLOV is pulling too many records.
    This issue is happening on Fridays when around 15000 employees submit the timecards, as Friday is our deadline for Timecard submission.
    I have tried different scenarios to replicate this issue in test intances but I am not able to replicate it.
    Please suggest what could be the issue and why is the whereclause is not getting appended in some scenarios.
    Thank you

    Hi,
    Thank you for your reply.
    The whoole LDT file is more than 30000 characters, which is not allowed in the post, so I have included only the lines which have customization.
    FYI: This is a Projects and Payroll layout.
    Following is my LDT file:
    # $Header: hxczzhxclayt0093.ldt 120.0 2008/02/08 09:26:10 bbayragi noship $
    # dbdrv: exec fnd bin FNDLOAD bin &phase=dat+10 checkfile:~PROD:~PATH:~FILE &ui_apps 0 Y UPLOAD @HXC:patch/115/import/hxclaytlayoutsld.lct @~PROD:~PATH/~FILE
    LANGUAGE = "US"
    LDRCONFIG = "hxclaytlayoutsld.lct 120.0"
    #Source Database seed121
    #RELEASE_NAME 12.1.0
    # -- Begin Entity Definitions --
    BEGIN HXC_LAYOUT_COMPONENTS
    "Projects Details Alternate Timecard Layout - Project"
    OWNER = "ORACLE12.1.0"
    COMPONENT_VALUE = "PROJECT"
    REGION_CODE = "HXC_CUI_TIMECARD"
    REGION_CODE_APP_SHORT_NAME = "HXC"
    ATTRIBUTE_CODE = "HXC_TIMECARD_PROJECT"
    ATTRIBUTE_CODE_APP_SHORT_NAME = "HXC"
    SEQUENCE = "200"
    COMPONENT_DEFINITION = "LOV"
    RENDER_TYPE = "WEB"
    PARENT_COMPONENT = "Projects Details Alternate Timecard Layout - Day Scope Building blocks for worker timecard matrix"
    LAST_UPDATE_DATE = "2004/05/24"
    BEGIN HXC_LAYOUT_COMP_QUALIFIERS
    "Projects Details Alternate Timecard Layout - Project"
    OWNER = "ORACLE12.1.0"
    QUALIFIER_ATTRIBUTE_CATEGORY = "LOV"
    QUALIFIER_ATTRIBUTE1 = "ProjectLOVVO"
    QUALIFIER_ATTRIBUTE2 = "N"
    QUALIFIER_ATTRIBUTE3 = "HXC_CUI_PROJECT_DETAILS_LOV"
    QUALIFIER_ATTRIBUTE4 = "809"
    QUALIFIER_ATTRIBUTE5 = "25"
    QUALIFIER_ATTRIBUTE6 = "HxcCuiProjectDetails|PROJECT-DISPLAY|CRITERIA|N|HxcCuiProjectId|PROJECT|RESULT|N|HxcCuiProjectDetails|PROJECT-DISPLAY|RESULT|N|HxcCuiProjectCoOrgId|LOCATION1|RESULT|N|HxcCuiProjectName|CNAME|RESULT|N"
    QUALIFIER_ATTRIBUTE8 = "ProjectDetails"
    QUALIFIER_ATTRIBUTE9 = "ProjectId#NUMBER"
    QUALIFIER_ATTRIBUTE10 = "oracle.apps.hxc.selfservice.timecard.server.ProjectLOVVO"
    QUALIFIER_ATTRIBUTE11 = "RESOURCE_IDENTIFIER_ID"
    QUALIFIER_ATTRIBUTE17 = "OraTableCellText"
    QUALIFIER_ATTRIBUTE20 = "N"
    QUALIFIER_ATTRIBUTE21 = "Y"
    QUALIFIER_ATTRIBUTE22 = "L"
    QUALIFIER_ATTRIBUTE25 = "FLEX"
    QUALIFIER_ATTRIBUTE26 = "PROJECTS"
    QUALIFIER_ATTRIBUTE27 = "Attribute1"
    QUALIFIER_ATTRIBUTE28 = "PROJECT"
    LAST_UPDATE_DATE = "2004/05/24"
    END HXC_LAYOUT_COMP_QUALIFIERS
    END HXC_LAYOUT_COMPONENTS
    BEGIN HXC_LAYOUT_COMPONENTS
    "Projects Details Alternate Timecard Layout - Task"
    OWNER = "ORACLE12.1.0"
    COMPONENT_VALUE = "TASK"
    REGION_CODE = "HXC_CUI_TIMECARD"
    REGION_CODE_APP_SHORT_NAME = "HXC"
    ATTRIBUTE_CODE = "HXC_TIMECARD_TASK"
    ATTRIBUTE_CODE_APP_SHORT_NAME = "HXC"
    SEQUENCE = "210"
    COMPONENT_DEFINITION = "LOV"
    RENDER_TYPE = "WEB"
    PARENT_COMPONENT = "Projects Details Alternate Timecard Layout - Day Scope Building blocks for worker timecard matrix"
    LAST_UPDATE_DATE = "2004/05/24"
    BEGIN HXC_LAYOUT_COMP_PROMPTS "HxcCuiTaskProjectId" "AK_PROMPT"
    OWNER = "ORACLE12.1.0"
    REGION_CODE = "HXC_CUI_TIMECARD"
    REGION_APP_SHORT_NAME = "HXC"
    ATTRIBUTE_CODE = "HXC_TIMECARD_PROJECT"
    ATTRIBUTE_APP_SHORT_NAME = "HXC"
    LAST_UPDATE_DATE = "2004/05/24"
    END HXC_LAYOUT_COMP_PROMPTS
    BEGIN HXC_LAYOUT_COMP_QUALIFIERS
    "Projects Details Alternate Timecard Layout - Task"
    OWNER = "ORACLE12.1.0"
    QUALIFIER_ATTRIBUTE_CATEGORY = "LOV"
    QUALIFIER_ATTRIBUTE1 = "TaskLOVVO"
    QUALIFIER_ATTRIBUTE2 = "N"
    QUALIFIER_ATTRIBUTE3 = "HXC_CUI_TASK_DETAILS_LOV"
    QUALIFIER_ATTRIBUTE4 = "809"
    QUALIFIER_ATTRIBUTE5 = "10"
    QUALIFIER_ATTRIBUTE6 = "HxcCuiTaskDetails|TASK-DISPLAY|CRITERIA|N|HxcCuiTaskProjectId|PROJECT|PASSIVE_CRITERIA|Y|HxcCuiTaskId|TASK|RESULT|N|HxcCuiTaskDetails|TASK-DISPLAY|RESULT|N|HxcCuiTaskBillableFlag|EXPTYPE|RESULT|N"
    QUALIFIER_ATTRIBUTE8 = "TaskDetails"
    QUALIFIER_ATTRIBUTE9 = "TaskId#NUMBER"
    QUALIFIER_ATTRIBUTE10 = "oracle.apps.hxc.selfservice.timecard.server.TaskLOVVO"
    QUALIFIER_ATTRIBUTE11 = "RESOURCE_IDENTIFIER_ID|TIMECARD_BIND_END_DATE"
    QUALIFIER_ATTRIBUTE14 = "HxcCuiTaskProjectId|PROJECT|Y#HxcCuiTaskProjectNumber|PROJECT-DISPLAY|Y"
    QUALIFIER_ATTRIBUTE15 = "project_id = ::HxcCuiTaskProjectId#upper(project_number) = upper(::HxcCuiTaskProjectNumber)"
    QUALIFIER_ATTRIBUTE17 = "OraTableCellText"
    QUALIFIER_ATTRIBUTE20 = "N"
    QUALIFIER_ATTRIBUTE21 = "Y"
    QUALIFIER_ATTRIBUTE22 = "L"
    QUALIFIER_ATTRIBUTE25 = "FLEX"
    QUALIFIER_ATTRIBUTE26 = "PROJECTS"
    QUALIFIER_ATTRIBUTE27 = "Attribute2"
    QUALIFIER_ATTRIBUTE28 = "TASK"
    LAST_UPDATE_DATE = "2004/05/24"
    END HXC_LAYOUT_COMP_QUALIFIERS
    END HXC_LAYOUT_COMPONENTS
    BEGIN HXC_LAYOUT_COMPONENTS
    "Projects Details Alternate Timecard Layout - Location"
    OWNER = "CUSTOM"
    COMPONENT_VALUE = "LOCATION"
    REGION_CODE = "HXC_CUI_TIMECARD"
    REGION_CODE_APP_SHORT_NAME = "HXC"
    ATTRIBUTE_CODE = "HXC_CUI_LOCATION_LABEL"
    ATTRIBUTE_CODE_APP_SHORT_NAME = "HXC"
    SEQUENCE = "215"
    COMPONENT_DEFINITION = "CHOICE_LIST"
    RENDER_TYPE = "WEB"
    PARENT_COMPONENT = "Projects Details Alternate Timecard Layout - Day Scope Building blocks for worker timecard matrix"
    LAST_UPDATE_DATE = "2004/05/24"
    BEGIN HXC_LAYOUT_COMP_QUALIFIERS "Projects Details Alternate Timecard Layout - Location"
    OWNER = "CUSTOM"
    QUALIFIER_ATTRIBUTE_CATEGORY = "CHOICE_LIST"
    QUALIFIER_ATTRIBUTE1 = "Custom2VO"
    QUALIFIER_ATTRIBUTE4 = "N"
    # QUALIFIER_ATTRIBUTE5 = "10"
    # QUALIFIER_ATTRIBUTE8 = "DisplayValue"
    # QUALIFIER_ATTRIBUTE9 = "Value#NUMBER"
    QUALIFIER_ATTRIBUTE10 = "oracle.apps.hxc.selfservice.timecard.server.Custom2VO"
    QUALIFIER_ATTRIBUTE17 = "OraTableCellText"
    QUALIFIER_ATTRIBUTE20 = "N"
    QUALIFIER_ATTRIBUTE21 = "Y"
    QUALIFIER_ATTRIBUTE22 = "L"
    QUALIFIER_ATTRIBUTE25 = "FLEX"
    QUALIFIER_ATTRIBUTE26 = "Dummy Element Context"
    QUALIFIER_ATTRIBUTE27 = "Attribute15"
    QUALIFIER_ATTRIBUTE28 = "LOCATION1"
    LAST_UPDATE_DATE = "2004/05/24"
    END HXC_LAYOUT_COMP_QUALIFIERS
    END HXC_LAYOUT_COMPONENTS
    BEGIN HXC_LAYOUT_COMPONENTS "Projects Details Alternate Timecard Layout - Expenditure Type"
    OWNER = "ORACLE"
    COMPONENT_VALUE = "EXPENDITURETYPE"
    REGION_CODE = "HXC_CUI_TIMECARD"
    REGION_CODE_APP_SHORT_NAME = "HXC"
    ATTRIBUTE_CODE = "HXC_TIMECARD_EXPTYPE"
    ATTRIBUTE_CODE_APP_SHORT_NAME = "HXC"
    SEQUENCE = "225"
    COMPONENT_DEFINITION = "PACKAGE_CHOICE_LIST"
    RENDER_TYPE = "WEB"
    PARENT_COMPONENT = "Projects Details Alternate Timecard Layout - Day Scope Building blocks for worker timecard matrix"
    LAST_UPDATE_DATE = "2004/05/23"
    BEGIN HXC_LAYOUT_COMP_QUALIFIERS "Projects Details Alternate Timecard Layout - Expenditure Type"
    OWNER = "ORACLE"
    QUALIFIER_ATTRIBUTE_CATEGORY = "PACKAGE_CHOICE_LIST"
    QUALIFIER_ATTRIBUTE1 = "BOLINF.XXHXC_TYPE_CHOICE.EXPTTYPE"
    QUALIFIER_ATTRIBUTE2 = "@RESOURCE_IDENTIFIER_ID|@TIMECARD_BIND_END_DATE"
    QUALIFIER_ATTRIBUTE4 = "N"
    QUALIFIER_ATTRIBUTE8 = "aliasname"
    QUALIFIER_ATTRIBUTE9 = "value#NUMBER"
    QUALIFIER_ATTRIBUTE20 = "N"
    QUALIFIER_ATTRIBUTE21 = "Y"
    QUALIFIER_ATTRIBUTE22 = "R"
    QUALIFIER_ATTRIBUTE24 = "ET_EXPENDITURE_TYPE"
    QUALIFIER_ATTRIBUTE25 = "FLEX"
    QUALIFIER_ATTRIBUTE26 = "OTL_ALIAS_1"
    QUALIFIER_ATTRIBUTE27 = "Attribute1"
    QUALIFIER_ATTRIBUTE28 = "EXPTYPE"
    LAST_UPDATE_DATE = "2004/05/24"
    END HXC_LAYOUT_COMP_QUALIFIERS
    END HXC_LAYOUT_COMPONENTS
    BEGIN HXC_LAYOUT_COMPONENTS "Projects Details Alternate Timecard Layout - Customer name"
    OWNER = "ORACLE"
    REGION_CODE = "HXC_CUI_TIMECARD"
    REGION_CODE_APP_SHORT_NAME = "HXC"
    ATTRIBUTE_CODE = "XXTW_HXC_TIMECARD_CUST_NAME"
    ATTRIBUTE_CODE_APP_SHORT_NAME = "HXC"
    SEQUENCE = "205"
    COMPONENT_DEFINITION = "TEXT_FIELD"
    RENDER_TYPE = "WEB"
    PARENT_COMPONENT = "Projects Details Alternate Timecard Layout - Day Scope Building blocks for worker timecard matrix"
    LAST_UPDATE_DATE = "2004/05/24"
    BEGIN HXC_LAYOUT_COMP_QUALIFIERS "Projects Details Alternate Timecard Layout - Customer name"
    OWNER = "ORACLE"
    QUALIFIER_ATTRIBUTE_CATEGORY = "TEXT_FIELD"
    QUALIFIER_ATTRIBUTE1 = "N"
    QUALIFIER_ATTRIBUTE2 = "Y"
    QUALIFIER_ATTRIBUTE3 = "20"
    QUALIFIER_ATTRIBUTE4 = "1"
    QUALIFIER_ATTRIBUTE5 = "20"
    QUALIFIER_ATTRIBUTE7 = "OraTableCellText"
    QUALIFIER_ATTRIBUTE17 = "NONE"
    QUALIFIER_ATTRIBUTE20 = "Y"
    QUALIFIER_ATTRIBUTE21 = "Y"
    QUALIFIER_ATTRIBUTE22 = "L"
    QUALIFIER_ATTRIBUTE25 = "FLEX"
    QUALIFIER_ATTRIBUTE26 = "PROJECTS"
    QUALIFIER_ATTRIBUTE27 = "Attribute9"
    QUALIFIER_ATTRIBUTE28 = "CNAME"
    QUALIFIER_ATTRIBUTE30 = "Y"
    LAST_UPDATE_DATE = "2004/05/24"
    END HXC_LAYOUT_COMP_QUALIFIERS
    END HXC_LAYOUT_COMPONENTS
    And the query in TASKLOVVO:
    SELECT task.task_number tasknumber, task.task_name, task_details taskdetails, task.task_id taskid, bolinf.GETALIASID(proj.project_type,proj.project_id,task.task_id, :1, :2) billable_flag, task.project_id, task.start_date, task.completion_date, task.chargeable_flag, proj.project_number , proj.project_details from pa_online_tasks_v task ,pa_online_projects_v proj where proj.project_id = task.project_id
    In the above query GETALIASID is a custom function that returns a value.
    Thank you
    Edited by: Santo on Mar 18, 2013 2:12 PM

  • Passing values to Dynamic where clause as IN parameter - ADF

    Hi,
    I am trying to get the Dynamic where clause query output something like below,
    select * from EMP where emp_id IN(200,203,204)
    How to pass values from setWhereCluase(emp_id,????)
    Thanks,

    I'd go about this a little differently (probably not the best way):
    1. Create view object lk_department (lookup). In the query add a union with something like "select null as ID, 'All' as name' from dual;". This adds a null value that they can select by leaving the combo box on "All". Add a 'order by id" so the null value is the first one. When creating the combo box you want it set to navigation mode, so select the whole viewobject from the data palette rather a specific field.
    2. Create a jTextField for the "Jobs" field.
    3. Create an application module method that does something like:
    public void filterEmployees(String job){
    ViewObject vo_departments = findViewObject("lk_departments");
    ViewObject vo_employees = findViewObject("employees");
    String wc = "1 = 1 ";
    String wc = " and job like '%"+job+"%'"
    if (vo_departments.getCurrentRow().getAttribute("Id") != null) {wc += "and department_id = "+vo_departments.getCurrentRow().getAttribute("Id");}
    vo_employees.setWhereClause(wc);
    vo_employees.executeQuery();
    this.sync;
    4. In your Jclient app, you just need to call the method of your appmodule and insert the string from the textbox, using code similar to this:
    AppModule b = (AppModule)panelBinding.getApplicationModule();
    b.filterEmployees(jTextField.getText());
    I didn't test this code, but that's how I go about the same thing.

  • REP 300 error when using dynamic where clause

    Hi,
    I am developing a report and I need a dynamic where clause.The code I have written in the where clause is as below
    function where_clauseFormula return VARCHAR2 is
    begin
    if :P_PO_REQD = 'No' then
    return ('and pha.segment1 is null');
    elsif :P_PO_REQD = 'Yes' then
         return('and pha.segment1 between NVL(:p_po_num_from,1) and NVL(:p_po_num_to,99999999999999999)');
    else return NULL;
    end if;
    end;
    Now if i directly use either of the conditions in my report query it works fine.But if the parameter is No then the where clause does not work.I have also tried different statements in the if clause of the 'No' part and they work.For example the following code works when :P_PO_REQD is 'No' :
    function where_clauseFormula return VARCHAR2 is
    begin
    if :P_PO_REQD = 'No' then
    return ('and pha.segment1 between NVL(:p_po_num_from,1) and NVL(:p_po_num_to,99999999999999999)');
    elsif :P_PO_REQD = 'Yes' then
         return('and pha.segment1 between NVL(:p_po_num_from,1) and NVL(:p_po_num_to,99999999999999999)');
    else return NULL;
    end if;
    end;
    I don't know why this is happening.I really need a solution or a workaround urgently
    Thanks
    Mukund

    You may use Lexical Reference for the dynamic where. In After Parameter Form Trigger, code....
    if :P_PO_REQD = 'No' then
    :P_where := :P_where || 'and pha.segment1 is null';
    elsif :P_PO_REQD = 'Yes' then
    :P_where := :P_where || 'and pha.segment1 between NVL(:p_po_num_from,1) and NVL(:p_po_num_to,99999999999999999)';
    end if;
    ..........

  • How do you use 3 Where Clauses in a query

    Hi, i am trying to figure out how to use 3 Where Clauses in a Query where 2 of the Where Clauses uses a Sub query.
    Display the OrderID of all orders that where placed after all orders placed by “Bottom-Dollar Markets”.
    Order the result by OrderID in ascending order.
    First WHERE clause checks for OrderDate and uses a sub query with ALL keyword.
    Second WHERE clause use equals and sub query.
    Third WHERE clause uses equal and company name.
    This is what i have so far but i am pretty confused on how to do this.
    My Code for NorthWind:
    Select OrderID
    From Orders o
    Where o.OrderID IN (Select OrderDate From Orders Where Orders.OrderID > ALL
    (Select CompanyName From Customers Where CompanyName = 'Bottom-Dollar Markets'));
    The book shows how to use the ALL Keyword but not in a Sub query with Multiple Where Clauses.
    Select VenderName, InvoiceNumber, InvoiceTotal
    FROM Invoices JOIN Vendors ON Invoices.VendorID = Vendors.VendorID
    WHERE InvoiceTotal > ALL (Select InvoiceTotal From Invoices Where VendorID = 34)
    ORDER BY VendorName;

    >Where Orders.OrderDate
    > ALL  (Select
    CompanyName
    The comparison operator (>) requires compatible data types.
    DATETIME is not compatible with VARCHAR string for comparison.
    Here is your homework:
    SELECT orderid
    FROM orders o
    WHERE o.orderdate > ALL (SELECT orderdate
    FROM orders
    WHERE shipvia = (SELECT Max(shipvia)
    FROM orders o
    INNER JOIN customers c
    ON c.customerid =
    o.customerid
    WHERE
    c.companyname = 'Bottom-Dollar Markets'));
    11064
    11065
    11066
    11067
    11068
    11069
    11070
    11071
    11072
    11073
    11074
    11075
    11076
    11077
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Database Design
    New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014

  • Creating WHERE clause for an outer join using DatabaseFilter

    Hi all,
    I read a post on thie group about constructing the WHERE clause for a RowSet Controls
    SQL Query using the DatabaseFilter and this is what it said:
    ****************************************************************************The
    following example shows adding part of a WHERE clause in an action method of a
    page flow:
    DatabaseFilter.FilterTerm term = new DatabaseFilter.FilterTerm(); term.sColumnName
    = "name"; term.op = DatabaseFilter.opContains; // there are ops for equals, less
    than, etc... term.value = form.getPartialName();
    // You can also add sort terms for an ORDER BY clause allNames = dbControl.getNames(new
    DatabaseFilter(new DatabaseFilter.FilterTerm[] {term}, null));
    I am trying to create a where clause which uses a join like this:
    Select * from x,y where x.id=y.id (+)
    ie. All values from x.id but only corrosponding ones from y.id.
    Is there any way to build this outer join query using the DatabaseFilter class
    or am i forced to use a String which is contruct in my page flow as the where
    clause?like so:
    * @jc:sql command-type="grid"
    * rowset-name="RFPSRowSet"
    * max-rows="1000"
    * statement::
    * SELECT RFPS.RFP_ID,RFPS.NAME AS RFP_NAME,RFPS.FFO_NUMBER,RFPS.RFP_TYPE,RFPS.CFDA_NUMBER,COMPETITIONS.NAME
    AS COMP_NAME,COMPETITIONS.COMPETITION_ID FROM RFPS,COMPETITIONS WHERE {sql: whereClause
    } {sql: filter.getOrderByClause ()}
    public RowSet getAllRfps(java.lang.String whereClause,DatabaseFilter filter)
    throws SQLException;
    and in my pageFlow action, i do the following:
    StringBuffer whereClause= new StringBuffer();
    whereClause.append("RFPS.RFP_ID = COMPETITIONS.RFP_ID (+)");
    if ((form.getRfpTitle() != null) &&
    (!form.getRfpTitle().equalsIgnoreCase("")))
    whereClause.append(" AND UPPER(RFPS.NAME) LIKE %"+form.getRfpTitle().toUpperCase());
    if ((form.getCfdaNumber() != null) &&
    (!form.getCfdaNumber().equalsIgnoreCase("")))
    whereClause.append(" AND RFPS.CFDA_NUMBER ="+form.getCfdaNumber());
    if ((form.getFfoNumber() != null) &&
    (!form.getFfoNumber().equalsIgnoreCase("")))
    whereClause.append(" AND RFPS.FFO_NUMBER ="+form.getFfoNumber());
    sortFilterService = SortFilterService.getInstance(getRequest());
    DatabaseFilter filter=sortFilterService.getDatabaseFilter(getGridName());
    log.debug("***********"+whereClause.toString()+"***********");
    allRows = searchRfaAndComp.getAllRfps(whereClause.toString(),filter);
    Thanks in advance for your help,
    Regards,
    Vik.

    Thanks for your reply. Just one more question....if we indeed are trying to use
    a simple query and have a where clause like "select * from x where upper(x) like
    {x}", how do we set the UPPER filter on the column using the database filter?
    I see a IDENTIFIER.ISUPPER static field on that DatabaseFilter but am unsure how
    to use it. Would appreciate any pointers .
    Thanks again,
    Vik
    Eddie O'Neil <[email protected]> wrote:
    Vik--
    I believe that the approach that you describe below is the best one
    for dealing with outer joins
    with the DatabaseFilter.
    Apologies for the limitation...
    Eddie
    vik wrote:
    Hi all,
    I read a post on thie group about constructing the WHERE clause fora RowSet Controls
    SQL Query using the DatabaseFilter and this is what it said:
    ****************************************************************************The
    following example shows adding part of a WHERE clause in an actionmethod of a
    page flow:
    DatabaseFilter.FilterTerm term = new DatabaseFilter.FilterTerm(); term.sColumnName
    = "name"; term.op = DatabaseFilter.opContains; // there are ops forequals, less
    than, etc... term.value = form.getPartialName();
    // You can also add sort terms for an ORDER BY clause allNames = dbControl.getNames(new
    DatabaseFilter(new DatabaseFilter.FilterTerm[] {term}, null));
    I am trying to create a where clause which uses a join like this:
    Select * from x,y where x.id=y.id (+)
    ie. All values from x.id but only corrosponding ones from y.id.
    Is there any way to build this outer join query using the DatabaseFilterclass
    or am i forced to use a String which is contruct in my page flow asthe where
    clause?like so:
    * @jc:sql command-type="grid"
    * rowset-name="RFPSRowSet"
    * max-rows="1000"
    * statement::
    * SELECT RFPS.RFP_ID,RFPS.NAME AS RFP_NAME,RFPS.FFO_NUMBER,RFPS.RFP_TYPE,RFPS.CFDA_NUMBER,COMPETITIONS.NAME
    AS COMP_NAME,COMPETITIONS.COMPETITION_ID FROM RFPS,COMPETITIONS WHERE{sql: whereClause
    sql: filter.getOrderByClause ()}* ::
    public RowSet getAllRfps(java.lang.String whereClause,DatabaseFilter
    filter)
    throws SQLException;
    and in my pageFlow action, i do the following:
    StringBuffer whereClause= new StringBuffer();
    whereClause.append("RFPS.RFP_ID = COMPETITIONS.RFP_ID (+)");
    if ((form.getRfpTitle() != null) &&
    (!form.getRfpTitle().equalsIgnoreCase("")))
    whereClause.append(" AND UPPER(RFPS.NAME) LIKE %"+form.getRfpTitle().toUpperCase());
    if ((form.getCfdaNumber() != null) &&
    (!form.getCfdaNumber().equalsIgnoreCase("")))
    whereClause.append(" AND RFPS.CFDA_NUMBER ="+form.getCfdaNumber());
    if ((form.getFfoNumber() != null) &&
    (!form.getFfoNumber().equalsIgnoreCase("")))
    whereClause.append(" AND RFPS.FFO_NUMBER ="+form.getFfoNumber());
    sortFilterService = SortFilterService.getInstance(getRequest());
    DatabaseFilter filter=sortFilterService.getDatabaseFilter(getGridName());
    log.debug("***********"+whereClause.toString()+"***********");
    allRows = searchRfaAndComp.getAllRfps(whereClause.toString(),filter);
    Thanks in advance for your help,
    Regards,
    Vik.

  • 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

  • Access Sequence for PO output

    Hi experts, I have defined new PO output type in NACE by copying existing one. I have created New Condition Table for PO output (in SPRO). Now, i want to create new access sequence. But, i am facing following problems 1. If i try to create new access

  • Editing BSEG-VBUND on a posted document.

    Does anybody know if it is possible to edit the VBUND field on a posted document? Thanks for your help!

  • Annoying error message: ieee80211 phy0: invalid plcp cck rate (0)

    Greetings Fellow Forumers! I have an annoying issue caused by (I think) the firmware (carl9170) necessary to allow my USB NIC to work.  The issue itself is that this message will pop up on my console and TTY: ieee80211 phy0: invalid plcp cck rate (0)

  • Hello i want to transfer my phone contact to sim.

    Hello Frnds i would like to know that how i can save my phone contacts to Sim it,s a big problem for me kindly give me your Ideas and experiences about transferring phone contacts to sim contacts.I like iphone too much but bcoz of this Issue i can,t

  • Service charge on 90 days of warranty time

    Hi guys I just bought a new MacBook Pro retina display on December 2012. Yesterday I want to restore it to factory settings. I follow the guide after restart macbook while holding down the command + r keys...and so on. Unfortunately after 3x I had tr