How to use 'IN' expression for SQL in DB adapter

Hi,
I am working on BPEL PM 10.1.3.3 and need to configure db adapter to get multiple values for one parameter similar to " where deptid in ('1,2,3)".
While configuring the adapter I am not able to find any such option. Also I need to use custom SQL. I have already tried SQL given below
select deptname from dept where dept in (#deptID)
This type of SQL generates an error. I am sure there should be a way to achieve this but donot know how to :(
-AAg

This is not possible. You should program on advance the amount of IN paramaters
IN (#p1, #p2, #p3, #p4)
or
IN (#p1, NVL(#p2, #p1), NVL(#p3, #p1), NVL(#p4, #p1))

Similar Messages

  • How to use evaluate function for sql server function

    Hi Team,
    We have imported a column(date dtat type) from SQL server cube . By default it imported as varchar,. We have three option in physical layer for this column(Varchar,Intiger,unknown)
    So we want to convert this column into date.can we use evaluate or there is any option to do that.?

    Hi,
    I am not sure your requirement. But how pass evaluate function obiee?
    syntax:- EVAULATE('your db function(%1,%2)', parameter list)
    here %1 and %2 are the no.of parameters (columns or may constant values) to be passed for the db-function
    if you have 3 parameters then you need to use %3 also.. means the columns to be passed.
    following exapmples are for ORACLE db,
    ex1: EVALUATE('upper(%1)', 'satya ranki reddy') gives the result as -> SATYA RANKI REDDY
    ex2: EVALUATE('upper(%1)', 'Markets.Region') here Markets.Region is column.
    you also can call the user-defined functions through evaulate
    EVALUATE('functioname(%1,%2), column1, column2)
    the above function has 2 parameters to be inputted
    Hope this help's
    Thanks
    Satya

  • How to use Tuning Pack for SQL tuning

    We're just getting started with 10g, and I'm more familiar with 9i. In OEM 9i, there was something called Oracle SQL Analyze. It allowed you to work on a problem SQL statement, adding hints, making other changes, etc., and then you could easily compare the plan for two versions of a query. You could also execute right from there and it'd let you click on a tab to view the statistics. You could compare the statistics for two versions of the same statement.
    I don't see anything like this in 10.1 GC, and that's with both the Diagnostic and Tuning Packs activated. There are a number of ways you can identify an SQL for analysis, then get an explain plan, then get some recommendations. But I don't see anything that allows you to add hints, compare different versions of the explain plan, or compare the statistics for different versions of a statement.
    Am I missing something?
    Thanks.
    Dave

    Rodney,
    Thanks for the reply. Yes, I agree, the Java console which runs directly on Windows is quite limited. Change Manager is there, as you indicated. However, MetaLink note 277066.1 indicates that "Tuning Pack Functionality" is also available in the Java version, and I don't see any of it there.
    What I'm looking for is a framework for testing different versions of an SQL statement. I want to be able to execute the current version of a statement and, for example, a modified version with a hint added. I want to be able to see at least the basic statisitics comparing the two exections (e.g., elapsed time, logical reads, physical reads). This was possible with SQL Analyze in 9i, but I can't find anything like it in 10g.
    I have found both the 10g advisors you mentioned and they do seem to work, but they don't provide the same flexibility and power for working on statement tuning apart from what the advisors recommend.
    Thanks for all the suggestions/ideas...
    Dave

  • Is there a way to turn the wireless capabilities off on an AirPort Express?  I have an AirPort Extreme as my main router and use the express to just extend it. I only really want to you use the express for hard ethernet connections

    Is there a way to turn the wireless capabilities off on an AirPort Express?  I have an AirPort Extreme as my main router and use the express to just extend it. I only really want to you use the express for hard ethernet connections. For whatever reason when I have my express extend my wifi at home the download speed from just the express is absolutely terrible, drops to about 1.5 mb compared to when it's on the extremes part of the network the speed goes up to 50-75mb. These terrible download speed really only affects the iPhones as my MacBook Pro usually gets the good speed no matter where it is. I don't believe there is anything wrong with my phone because if I am in the part of the house that uses just the extreme the download speeds on the iphone goes up to 50-75mb. As a note I have an AirPort Extreme on the top floor of my house (second floor) that's where my modem is located. On the first floor that's where one airport express is located. I also have another airport express in the basement that is accessed by my landlord. Any thoughts on how to fix this would be helpful.

    Is there a way to turn the wireless capabilities off on an AirPort Express?  I have an AirPort Extreme as my main router and use the express to just extend it. I only really want to you use the express for hard ethernet connections.
    It appears that your networking goals with the AirPort Express is to use it as a wireless Ethernet bridge instead of using it to extend the wireless range of your AirPort Extreme. The latter requires that the Express Wi-Fi radios be enabled.
    If you intended to use the Express as a wireless bridge, you just need to reconfigure it to "Join a wireless" network instead of "Extend a wireless network."
    For whatever reason when I have my express extend my wifi at home the download speed from just the express is absolutely terrible, drops to about 1.5 mb compared to when it's on the extremes part of the network the speed goes up to 50-75mb.
    In an extended network, the placement of the extending base station is critical as it can only extend the wireless network at the bandwidth at which it receives it.
    Please check out the following AirPort User Tip for details on optimal base station placement.

  • How to use OEM to moniter sql server 2000

    Hi,
    I need to learn How to use OEM to moniter sql server 2000.
    Can anyone help me and give me some website or documents
    to read?
    So I can learn to do this job.
    Thanks.

    See Note 115302.1 in Metalink.oracle.com
    in how to use OEM Diagnostic pack addon for SQL Server
    Or search for
    oem "user events"
    to build your own monitor script.

  • Using Copy Express for transfering Chart Of Accounts

    Can any one tell me how to use Copy Express Add-On
    And also how to save the xml. file of exiting database template and upload into new database.
    thanx in advance.

    You can search for Copy Express in https://websmp208.sap-ag.de/smb/sbo/documentation page and there are PDF's, Online helps files, Recorded Webex sessions.
    I am sure they would be helpful
    Suda

  • Request some help, over procedure's performance uses regular expressions for its functinality

    Hi All,
            Below is the procedure, having functionalities of populating two tables. For first table, its a simple insertion process but for second table, we need to break the soruce record as per business requirement and then insert into the table. [Have used regular expressions for that]
            Procedure works fine but it takes around 23 mins for processing 1mm of rows.
            Since this procedure would be used, parallely by different ETL processes, so append hint is not recommended.
            Is there any ways to improve its performance, or any suggestion if my approach is not optimized?  Thanks for all help in advance.
    CREATE OR REPLACE PROCEDURE SONARDBO.PRC_PROCESS_EXCEPTIONS_LOGS_TT
         P_PROCESS_ID       IN        NUMBER, 
         P_FEED_ID          IN        NUMBER,
         P_TABLE_NAME       IN        VARCHAR2,
         P_FEED_RECORD      IN        VARCHAR2,
         P_EXCEPTION_RECORD IN        VARCHAR2
        IS
        PRAGMA AUTONOMOUS_TRANSACTION;
        V_EXCEPTION_LOG_ID     EXCEPTION_LOG.EXCEPTION_LOG_ID%TYPE;
        BEGIN
        V_EXCEPTION_LOG_ID :=EXCEPTION_LOG_SEQ.NEXTVAL;
             INSERT INTO SONARDBO.EXCEPTION_LOG
                 EXCEPTION_LOG_ID, PROCESS_DATE, PROCESS_ID,EXCEPTION_CODE,FEED_ID,SP_NAME
                ,ATTRIBUTE_NAME,TABLE_NAME,EXCEPTION_RECORD
                ,DATA_STRUCTURE
                ,CREATED_BY,CREATED_TS
             VALUES           
             (   V_EXCEPTION_LOG_ID
                ,TRUNC(SYSDATE)
                ,P_PROCESS_ID
                ,'N/A'
                ,P_FEED_ID
                ,NULL 
                ,NULL
                ,P_TABLE_NAME
                ,P_FEED_RECORD
                ,NULL
                ,USER
                ,SYSDATE  
            INSERT INTO EXCEPTION_ATTR_LOG
                EXCEPTION_ATTR_ID,EXCEPTION_LOG_ID,EXCEPTION_CODE,ATTRIBUTE_NAME,SP_NAME,TABLE_NAME,CREATED_BY,CREATED_TS,ATTRIBUTE_VALUE
            SELECT
                EXCEPTION_ATTR_LOG_SEQ.NEXTVAL          EXCEPTION_ATTR_ID
                ,V_EXCEPTION_LOG_ID                     EXCEPTION_LOG_ID
                ,REGEXP_SUBSTR(str,'[^|]*',1,1)         EXCEPTION_CODE
                ,REGEXP_SUBSTR(str,'[^|]+',1,2)         ATTRIBUTE_NAME
                ,'N/A'                                  SP_NAME    
                ,p_table_name
                ,USER
                ,SYSDATE
                ,REGEXP_SUBSTR(str,'[^|]+',1,3)         ATTRIBUTE_VALUE
            FROM
            SELECT
                 REGEXP_SUBSTR(P_EXCEPTION_RECORD, '([^^])+', 1,t2.COLUMN_VALUE) str
            FROM
                DUAL t1 CROSS JOIN
                        TABLE
                            CAST
                                MULTISET
                                    SELECT LEVEL
                                    FROM DUAL
                                    CONNECT BY LEVEL <= REGEXP_COUNT(P_EXCEPTION_RECORD, '([^^])+')
                                AS SYS.odciNumberList
                        ) t2
            WHERE REGEXP_SUBSTR(str,'[^|]*',1,1) IS NOT NULL
            COMMIT;
           EXCEPTION
             WHEN OTHERS THEN
             ROLLBACK;
             RAISE;
        END;
    Many Thanks,
    Arpit

    Regex's are known to be CPU intensive specially when dealing with large number of rows.
    If you have to reduce the processing time, you need to tune the Select statements.
    One suggested change could be to change the following query
    SELECT
                 REGEXP_SUBSTR(P_EXCEPTION_RECORD, '([^^])+', 1,t2.COLUMN_VALUE) str
            FROM
                DUAL t1 CROSS JOIN
                        TABLE
                            CAST
                                MULTISET
                                    SELECT LEVEL
                                    FROM DUAL
                                    CONNECT BY LEVEL <= REGEXP_COUNT(P_EXCEPTION_RECORD, '([^^])+')
                                AS SYS.odciNumberList
                        ) t2
    to
    SELECT REGEXP_SUBSTR(P_EXCEPTION_RECORD, '([^^])+', 1,level) str
    FROM DUAL
    CONNECT BY LEVEL <= REGEXP_COUNT(P_EXCEPTION_RECORD, '([^^])+')
    Before looking for any performance benefit, you need to ensure that this does not change your output.
    How many substrings are you expecting in the P_EXCEPTION_RECORD? If less than 5, it will be better to opt for SUBSTR and INSTR combination as it might work well with the number of records you are working with. Only trouble is, you will have to write different SUBSTR and INSTR statements for each column to be fetched.
    How are you calling this procedure? Is it not possible to work with Collections? Delimited strings are not a very good option as it requires splitting of the data every time you need to refer to.

  • How to use execute immediate for character string value 300

    how to use execute immediate for character string value > 300 , the parameter for this would be passed.
    Case 1: When length = 300
    declare
    str1 varchar2(20) := 'select * from dual';
    str2 varchar2(20) := ' union ';
    result varchar2(300);
    begin
    result := str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || ' ';
    dbms_output.put_line('length : '|| length(result));
    execute immediate result;
    end;
    /SQL> 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
    length : 300
    PL/SQL procedure successfully completed.
    Case 2: When length > 300 ( 301)
    SQL> set serveroutput on size 2000;
    declare
    str1 varchar2(20) := 'select * from dual';
    str2 varchar2(20) := ' union ';
    result varchar2(300);
    begin
    result := str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || str2 ||
    str1 || ' ';
    dbms_output.put_line('length : '|| length(result));
    execute immediate result;
    end;
    /SQL> 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21
    declare
    ERROR at line 1:
    ORA-06502: PL/SQL: numeric or value error: character string buffer too small
    ORA-06512: at line 6

    result varchar2(300);Answer shouldn't be here ? In the greater variable ?
    Nicolas.

  • How to use Batch operation for two xsodata services?

    Hi All,
    I have two xsodata services. How to use submit batch for two xsodata services
    Thanks,
         Mj

    Gateway Batch Calls from SAPUI5

  • How to use same actions for differ pop-up

    Hi gurus,
    I am using 2 popup in a view.same popup's having same buttons 'Yes', 'No'.when i use 1st one i have to create an action for that Yes button where i put my code for that particular Action.
    But when i used 2nd one the action define for that is not acceptable with differ name.it takes only standard one.
    Now my Query is : How to use same actions for differ pop-up buttons with in a similar view?Where i put my code.
    Plz sugges me.
    <b>Points will be sured.</b>
    Sanket sethi

    Hi,
    Take one integer value attribute in the context of view
    when you r performing action on POP1 set it's value to 1
    when you r performing action on POP2 set it's value to 2
    create one method which receives integer argument, say diaplay(int a)
    In the action call display(wdContext.currentContextElement().get<intvariable>()) by passing the value in the context attribute
    in display() method, Check the value of integer variable..
    if it is 1 then perform action related to POP1
    if it is 2 then perform action related to POP2
    Regards
    LakshmiNarayana

  • How to use same actions for differ pop-up buttons

    Hi gurus,
    I am using 2 popup in a view.same popup's having same buttons 'Yes', 'No'.when i use 1st one i have to create an action for that Yes button where i put my code for that particular Action.
    But when i used 2nd one the action define for that is not acceptable with differ name.it takes only standard one.
    Now my Query is : How to use same actions for differ pop-up buttons with in a similar view?Where i put my code.
    Plz sugges me.
    <b>Points will be sured.</b>
    Sanket sethi

    Hi ,
    u can use the method SUBSCRIBE_TO_BUTTON_EVENT of the IF_WD_WINDOW interface ... to handle the event fired by the popup .....used this method after creating the popup window ...
    regards
    Yash

  • How to Use PM BAPI for equipment Master upload : BAPI_EQUIPMENT_SAVEREPLICA

    Hi ,
      How to use PM BAPI for equipment Master upload : BAPI_EQUIPMENT_SAVEREPLICA.
      May i know what are the input parameters & fields mandatory
      for each Table structures ct_data , ct_datax , it_descript , it_longtext.
      Can any one explain me Step by Step Process.
      B'cos i tried with below code. Equipment is not getting created.
      wa_itab-equipment_ext = '000000000100000001'.
      wa_itab-descript      = 'Test 2 -> Lube Oil Pump'.
      wa_itab-text_language = 'EN'.
      wa_itab-sdescript     = 'Short Description'.
      APPEND wa_itab TO it_itab.
      CLEAR  wa_itab.
      LOOP AT it_itab INTO wa_itab.
        ct_data-ta_guid       = '000000000000000001'.
        ct_data-equipment_ext = wa_itab-equipment_ext.
        ct_data-descript      = wa_itab-descript     .
        ct_data-valid_date    = sy-datum.
        ct_data-equicatgry    = 'M'.
        APPEND ct_data.
        CLEAR  ct_data.
        ct_datax-ta_guid       = '000000000000000001'.
        ct_datax-equipment_ext = 'X'.
        ct_datax-equipment     = 'X'.
        APPEND ct_datax.
        CLEAR  ct_datax.
        it_descript-ta_guid       = '000000000000000001'.
        it_descript-text_language = wa_itab-text_language.
        it_descript-descript      = wa_itab-sdescript    .
        APPEND it_descript.
        CLEAR  it_descript.
        it_longtext-ta_guid        = '000000000000000001'.
        it_longtext-text_language  = wa_itab-text_language.
        it_longtext-text_id        = 'LTXT'.
        it_longtext-text_line      = 'SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS'.
        APPEND it_longtext.
        CLEAR  it_longtext.
        it_longtext-ta_guid        = '000000000000000001'.
        it_longtext-text_language  = wa_itab-text_language.
        it_longtext-text_id        = 'INTV'.
        it_longtext-text_line      = 'aaaaaaaaaaaaaaa'.
        APPEND it_longtext.
        CLEAR  it_longtext.
        it_longtext-ta_guid        = '000000000000000001'.
        it_longtext-text_language  = wa_itab-text_language.
        it_longtext-text_id        = 'INTV'.
        it_longtext-text_line      = 'bbbbbbbbbbbb'.
        APPEND it_longtext.
        CLEAR  it_longtext.
        it_longtext-ta_guid        = '000000000000000001'.
        it_longtext-text_language  = wa_itab-text_language.
        it_longtext-text_id        = 'INTV'.
        it_longtext-text_line      = 'cccccccccccccccc'.
        APPEND it_longtext.
        CLEAR  it_longtext.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
      call BAPI-function in this system
        CALL FUNCTION 'BAPI_EQUIPMENT_SAVEREPLICA'
          TABLES
            ct_data     = ct_data
            ct_datax    = ct_datax
            it_descript = it_descript
            it_longtext = it_longtext
            return      = return
          EXCEPTIONS
            OTHERS      = 1.
        IF sy-subrc = 0.
          CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
          WRITE : 'Successful'.
        ENDIF.
        IF NOT return IS INITIAL.
          LOOP AT return.
            IF return-type = 'A' OR return-type = 'E'.
              WRITE : 'Error'.
            ENDIF.
          ENDLOOP.
        ENDIF.
        REFRESH  return.
      ENDLOOP.
    Regards
    SUrendar

    Hi ,
      How to use PM BAPI for equipment Master upload : BAPI_EQUIPMENT_SAVEREPLICA.
      May i know what are the input parameters & fields mandatory
      for each Table structures ct_data , ct_datax , it_descript , it_longtext.
      Can any one explain me Step by Step Process.
      B'cos i tried with below code. Equipment is not getting created.
      wa_itab-equipment_ext = '000000000100000001'.
      wa_itab-descript      = 'Test 2 -> Lube Oil Pump'.
      wa_itab-text_language = 'EN'.
      wa_itab-sdescript     = 'Short Description'.
      APPEND wa_itab TO it_itab.
      CLEAR  wa_itab.
      LOOP AT it_itab INTO wa_itab.
        ct_data-ta_guid       = '000000000000000001'.
        ct_data-equipment_ext = wa_itab-equipment_ext.
        ct_data-descript      = wa_itab-descript     .
        ct_data-valid_date    = sy-datum.
        ct_data-equicatgry    = 'M'.
        APPEND ct_data.
        CLEAR  ct_data.
        ct_datax-ta_guid       = '000000000000000001'.
        ct_datax-equipment_ext = 'X'.
        ct_datax-equipment     = 'X'.
        APPEND ct_datax.
        CLEAR  ct_datax.
        it_descript-ta_guid       = '000000000000000001'.
        it_descript-text_language = wa_itab-text_language.
        it_descript-descript      = wa_itab-sdescript    .
        APPEND it_descript.
        CLEAR  it_descript.
        it_longtext-ta_guid        = '000000000000000001'.
        it_longtext-text_language  = wa_itab-text_language.
        it_longtext-text_id        = 'LTXT'.
        it_longtext-text_line      = 'SSSSSSSSSSSSSSSSSSSSSSSSSSSSSSSS'.
        APPEND it_longtext.
        CLEAR  it_longtext.
        it_longtext-ta_guid        = '000000000000000001'.
        it_longtext-text_language  = wa_itab-text_language.
        it_longtext-text_id        = 'INTV'.
        it_longtext-text_line      = 'aaaaaaaaaaaaaaa'.
        APPEND it_longtext.
        CLEAR  it_longtext.
        it_longtext-ta_guid        = '000000000000000001'.
        it_longtext-text_language  = wa_itab-text_language.
        it_longtext-text_id        = 'INTV'.
        it_longtext-text_line      = 'bbbbbbbbbbbb'.
        APPEND it_longtext.
        CLEAR  it_longtext.
        it_longtext-ta_guid        = '000000000000000001'.
        it_longtext-text_language  = wa_itab-text_language.
        it_longtext-text_id        = 'INTV'.
        it_longtext-text_line      = 'cccccccccccccccc'.
        APPEND it_longtext.
        CLEAR  it_longtext.
        CALL FUNCTION 'BAPI_TRANSACTION_COMMIT'.
      call BAPI-function in this system
        CALL FUNCTION 'BAPI_EQUIPMENT_SAVEREPLICA'
          TABLES
            ct_data     = ct_data
            ct_datax    = ct_datax
            it_descript = it_descript
            it_longtext = it_longtext
            return      = return
          EXCEPTIONS
            OTHERS      = 1.
        IF sy-subrc = 0.
          CALL FUNCTION 'BAPI_TRANSACTION_ROLLBACK'.
          WRITE : 'Successful'.
        ENDIF.
        IF NOT return IS INITIAL.
          LOOP AT return.
            IF return-type = 'A' OR return-type = 'E'.
              WRITE : 'Error'.
            ENDIF.
          ENDLOOP.
        ENDIF.
        REFRESH  return.
      ENDLOOP.
    Regards
    SUrendar

  • How to use Web Serivce for not jsr 172 phone

    Hi:
    Is anyone know, how to use web service for phones that only have standard J2ME package installed (without jsr 172 web service packagenstalled)?
    thank you

    Hi,
    I think you need to write the code for this from scratch (built on top of existing HTTP functionality). There may be open-source J2ME code you could use. I've never tried this so I'm afraid I don't know any more. But maybe that is what you were asking... i.e. does anyone have code that does this already...
    Tx,
    Sam

  • How to use 2 GL for loss made on asset retirement w/o revenue ?

    how to use 2 GL for loss made on asset retirement w/o revenue.
    hello everyone
    i have some trouble.
    my company want to use 2 GL account for asset retirement
    example  some time use GL 6500001  some time use 6500002
    in standard configuration AO90 , field loss made on asset retirement w/o revenue, there is only one field.
    so i can use only one G/L.
    it' s not good if i must to change configuration (and transport request )every time that user need to change GL.
    now i got one idea.
    i know that table T095 keep account determinaton and GL account data.
    so if i make program that change data from table T095 directly. i donot need to change config everytime.
    but i am not sure that this way will make impact other standard program or not.
    i will wait for better idea from everyone.
    please help.

    Substitution consist of several steps  each with two parts:
    1- Prerequisite
    2- Replacement
    If the prerequisite is satisfied (TRUE), substitution (Replacement) is performed.
    Transaction Code: OBBH.
    Thank you
    Javed

  • Explain how to use standard LSMW for MM01

    Can anyone explain how to use standard LSMW for MM01 Tcode.pls explain briefly.

    Hi
    Create a project using 0020 as method.
    Max

Maybe you are looking for

  • How to get calendar travel time (set up in Mavericks) to show on iOS 7 calendar?

    I was wondering how to get calendar travel time (set up in Mavericks) to show on iOS 7 calendar? If I change a location in mavericaks it is updated in my iOS 7 calendar, but if I add travel time to an appointment, that does not show up on my iphone.

  • [solved] Password no longer works at tty, but does work elsewhere

    Hi, The other day I could no longer log in to a tty; "Login incorrect", but other users are fine. You're probably thinking I forgot my password, but I can confirm it is correct as I can log in as "user2", "su - jsteel", enter the password and it acce

  • Variant / or / parameter  Tranaction for a report

    I want to create a transaction code for a report . This transaction code should load a variant ( Protect a parameter field  ( Value = xyz & user can not change it ) . Can someone tell me how to proceed  ? Thanks

  • Command Window control

    Hi, I was wondering if there was a way to control whether or not input appears in the command (MS-DOS) window or not. For example, if I have a program that does something like this: Please enter a Sentence. I am going to the store. presses enter Is t

  • 2.0 and 5.1 audio

    I have audio that is 2.0 and 5.1. Both for the MENUS and the single asset(movie). I know how to set up the main asset to select either audio via a set-up page. What I don't know is how to give the viewer the choice to select a 2.0 or 5.1 MENU experie