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

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.

  • How to dynamically list field names

    Hello,
    I have a DB Link to a SQL 2000 Server and can connect and retrieve using Heterogenous Servives.
    Let say I issued a Select (eg., Select * from tab@remote1), how do I dynamically list each field name from the result?
    Thank you.

    The best way to deal with dynamic column names from a SQL result is to use a cursor describe interface.
    A SQL SELECT may not select all the columns from a table. It may join tables. It may add derived and calculated columns to the result.
    None of these will be seen when using the data dictionary. Also, using a remote heterogeneous data dictionary? That does not sound like a sensible approach to me.
    In PL/SQL, one can create DBMS_SQL cursors. These cursors can be "described" - i.e. the describe interface for a cursor tells you what the contents are, the column names, the data types, the precision, etc.
    Using DBMS_SQL allows you to describe any result set from any SELECT statememt. A far superior and accurate method than to go data dictionary hunting to determine just which column could be in a result set.

  • How to dynamically update columns in a where clause to a SQL query in OSB?

    Hi Gurus,
    I have a requirement where in we need to dynamically update a where clause to a SQL query in OSB(11.1.1.6.0).
    For example:
    If the JCA sql string is "select * from emp where emp_id = 100 and emp_status ='Permanent'" now i want to change this where clause and the new query has to be like "select * from emp where emp_name like 'S%' and emp_dept like 'IT' ". basically we need to change the where clause dynamically.
    We can also use "fn-bea:execute-sql()" in a xquery but I don't want to use this function as creates a new connection.
    I have done some home work and found out --> as per the DOC "http://docs.oracle.com/cd/E23943_01/dev.1111/e15866/jca.htm#OSBDV943" section: "25.5.2 JCA Transport Configuration for Proxy and Business Services", when a business service is created by using JCA, we can see Interaction Spec Properties under JCA Transport Tab. This will have a property "SqlString' and we can over ride it. But I am unable to figure out how to over ride the value. I have tried by using Transport Headers activity but no luck. Please guide me how to achieve this?
    Thanks in advance
    Surya

    I solved my problem.
    In my header renderer, I simply added a line to set the text to the object value "label.setText( (String) value );" (where label is an instance of a JLabel.
    Thank you to who took some time to think about it.
    Marc

  • 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

  • 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

  • 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

  • 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

  • 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

  • How do I add place names to events in iPhoto 11

    How do I add place names to events iPhoto 11 version 9.2.1, I can do a single picture at a time but when you have a 100 or so it's going to get tedius.
    I have found messages  via google that tell me how to do it but it dos'nt work.
    I select the event I want to locate. then I  click "cmd i" to get the info screen up. Then at the bottom of the screen is a picture of the world and a box next to it where I think you should type in your location, but that just takes me to a map of the USA and I can't do anything.
    Help please, what am I doing wrong.

    Same problem here. Cannot understand why it is soooo difficult...

  • Need to Add Field Name to the Downloaded XLS file

    Im using the function SAP_CONVERT_TO_TXT_FORMAT
    and downloading the contents by sending them as attachements in email.
    I need to add field names(column name) to excel fields.
    So that when fields are displayed in excel file they are displayed by their column names..
    How do I do this.? Any ideas.
    Answers will be rewarded with points..

    Hi
    You can manually insert the column names as the first row in your internal table to have them in .xls file as headers.
    Regards,
    Raj

  • How do I add my name to the camera data file in meta data?

    When reviewing the meta data on my photos I see the camera model number, serial number, focal length, etc.  The camera owner field is blank.  How do I add my name to the camera owner field?
    I'm using Photoshop CC, on a windows 8.1 Pro platform.  Any help would be greatly appreciated.
    Caitlin

    I did add all the info on the menu section you mentioned above.  Unfortunately it does not show up as "Owner" when you view the data file in Photoshop CC for some reason. Copyright info shows properly, but not camera owner.  It's not a big problem anyway, just a pride of ownership thingy .  I downloaded the GeoSetter program, and after reviewing the meta data contained there I don't see an option for "owner" there either.  Perhaps its something that Adobe plans to implement someday, who knows. Thanks for your suggestions everyone.
    This is my first DSLR, all I have shot in the past have been film cameras and we didn't have any of this fancy info available unless we wrote it down somewhere, smile.  I was still using my old Nikomat that I purchased in 1972 when I was stationed in Japan. I was a bit stubborn when it came to switching to DSLR sorry I waited so long now.
    Oh, Trevor, sorry to learn you may be using something other than Nikon, I didn't know there was another brand other than Nikon!
    Caitlin

  • How to dynamically set column name in Answers

    Hi.
    How to dynamically set column name in Answers, for example I want to put presentation variable in column header. Is this possible?
    Regards,
    Goran Ocko
    http://108obiee.blogspot.com/

    May be a rude way .. but it works.
    Add narrative view and use Java script to change the column headings based on the variables.
    <script language="javascript" type="text/javascript">
    var a = document.getElementById('idResultsTableParent');
    var rows= a.getElementsByTagName('tr');
    rows[1].cells[1].innerText ="@{Presentation Variable}";
    </script>
    Editing the same post to remove irrelevant information.
    - Girish

  • I would like to set up my email on the apple tv as well as have my husband's email on there so we can view both sets of photos and videos - it is already set up in his name - how do i add my name so as to view my photo library from all of my devices?

    I would like to set up my email on the apple tv as well as have my husband's email on there so we can view both sets of photos and videos - it is already set up in his name - how do i add my name so as to view my photo library and songs from MY phone ?

    this is not a reply - i asked the question - still trying to learn how all this works - someone please HELP ME

  • Itunes wi-fi sync; how do I add a name for my new computer on the ipad 4?

    RE: itunes wi-fi sync;
    How do I add a name for my new macbook pro computer on the ipad 4?

    You cannot add a name for Mac on the iPad. I assume that you mean in the WiFi sync setting - not possible.

Maybe you are looking for

  • How to check the include box on vendor import?

    I am importing vendors using the DTW into B1 2007.  There are 2 outgoing payments setup and I would like them both to have the include box checked on the payment system tab of the BP master.  Is this possible to do during the import?   I did not see

  • How do I force all url links to open only in Firefox ?

    OS : WindowsXP-Prof_SP3 FF version 18.0.2 My default browser is FF, but not quite as expected. Url links appearing Outlook 2010 messages or appearing in website pages are mostly still opening another browser (AvantBrowser) instead of Firefox. How can

  • How to run mrp and capacity leveling through heuritics.

    Hi, How to run mrp and capacity leveling through heuritics. What are the setps required for production planning run this thing in the heuritics in pp/ds? Regards, Sunil

  • Uploaded Mac OS X Snow Leopard onto Macbook Pro and now iTunes wont iPhone

    Can someone pls help! I have recently uploaded Mac OS X Snow Leopard onto my Macbook pro and now iTunes won't recognise my iPhone. It does however recognise my iPhone in iphoto.... does anyone know how to resolve this??? I'M IN DESPERATE NEED FOR NEW

  • LUT in compressor 4.0 (new)

    Hi everyone! Just wondering before I download the new Compressor 4.0 if there is a way to import some sort of Look Up Table (LUT) 3D or 2D to adjust the look of the input file? Forexample a LOG-C ProRes file from Alexa to a Linear curve like REC709.