How to assign ODI Proc out parameter value to an ODI variable

hi,
Can someone kindly help me on assigning ODI Procedure's output parametr to an ODI variable.
My ODI Proc is:
proc p_name (e_code varchar2(100), o_num number(50))
is
type tab_e is table of xxx%rowtype index by varchar2(100);
l_tab_type tab_e;
begin
select e_no into o_num from xxx where e_name=e_code;
next 2 steps to populate table type variable
Step1
step28/
end;
i want to store the value of o_num in an ODI variable so that I can use that in a ODi package to evaluate its value and change the flow.
Now i tried to include the above code in ODi proc , but its showing error while executing it .
'Invalid SQL statement'.
Kindly advice or help on this issue.
Thanks,
Hema

Hellow,
I am new to ODI.
I ahve a data base query which returns more than one rows. Each row has more than one column.I wanted to assign these values to a variable . Finally this varibale values i wanted to write into a file in a package. What steps i need to follow to achieve this.
Regards,
Ranjan
Edited by: user12112389 on Jul 16, 2012 2:55 PM

Similar Messages

  • How to exec. stored procedure having out parameter value in shell script ?

    Hi Gurus,
    I am writing a shell script which is calling a SP having out parameter as varchar2.
    So how can i do this in shell scripting ? (I am a new in shell scripting)
    a simple example is preferred.
    Thanks
    Sandy

    So how can i do this in shell scripting ? Assuming you want to assign the out parameter value to a shell variable, here's a small example :
    SQL> select ename from emp where empno=7902;
    ENAME
    FORD
    SQL> create or replace procedure show_name (
      2     v_empno in number,
      3     v_ename out varchar2)
      4  is
      5  begin
      6     select ename into v_ename from emp
      7     where empno = v_empno;
      8  end;
    SQL> /
    Procedure created.
    SQL> exit
    Disconnected from Oracle Database 10g Enterprise Edition Release 10.2.0.2.0 - Production
    With the Partitioning, OLAP and Data Mining options
    $ cat show_name.sh
    ENAME=`sqlplus -s test/test << EOF
    set pages 0
    set feed off
    var V1 varchar2(30);
    exec show_name($1, :V1);
    print V1
    exit
    EOF`
    echo $ENAME
    $ ./show_name.sh 7902
    FORD
    $

  • Please help me how concatenate all the error messages and send it as out parameter value.

    Hi Experts,
    Please help me how concatenate all the error messages and send it as out parameter value.
    Thanks.

    Agree with Billy, exception handling is not something that is done by passing parameters around.
    PL/SQL, like other languages, provides a suitable exception handling mechanism which, if used properly, works completely fine.  Avoid misuing PL/SQL by trying to implement some other way of handling them.

  • Out parameter value into popup

    Hi,
    I have created a page process . there i call a procedure and it has a out parameter.
    value returned by out parameter i want to display on popup or alert box ,when i click on submit button of page process.
    Thanks & Regards
    Vedant
    Edited by: Vedant on Nov 20, 2011 8:42 PM

    Are you expecting similar kind of solution...
    REPORT  ytest_dynamic.
    TYPE-POOLS : abap.
    DATA : table_des TYPE REF TO cl_abap_structdescr.
    DATA : ifields TYPE abap_compdescr_tab,
              wa_field LIKE LINE OF ifields.
    DATA: it_fieldcat TYPE lvc_t_fcat,
              wa_fieldcat TYPE lvc_s_fcat.
    DATA: i_tab TYPE REF TO data.
    FIELD-SYMBOLS: <fs> TYPE STANDARD TABLE.
    PARAMETERS: p_table(30) TYPE c DEFAULT 'SFLIGHT'.
    "Create the Table definiton using the table name
    table_des ?= cl_abap_typedescr=>describe_by_name( p_table ).
    "Transfer all the fields to a table.
    ifields = table_des->components.
    LOOP AT ifields INTO wa_field.
      CLEAR wa_fieldcat.
      wa_fieldcat-fieldname = wa_field-name .
      wa_fieldcat-datatype = wa_field-type_kind.
      wa_fieldcat-inttype = wa_field-type_kind.
      wa_fieldcat-intlen = wa_field-length.
      wa_fieldcat-decimals = wa_field-decimals.
      wa_fieldcat-coltext = wa_field-name.
      wa_fieldcat-outputlen = wa_field-length.
      APPEND  wa_fieldcat TO it_fieldcat.
    ENDLOOP.
    CALL METHOD cl_alv_table_create=>create_dynamic_table
      EXPORTING
        it_fieldcatalog           = it_fieldcat
      IMPORTING
        ep_table                  = i_tab
    *    e_style_fname             =
      EXCEPTIONS
        generate_subpool_dir_full = 1
        OTHERS                    = 2
    IF sy-subrc ne 0.
    ENDIF.
    ASSIGN i_tab->* TO <fs>. "Internal Table will be created.

  • How to call a stored procedure which has out parameter value

    my code is
    public Connection createConnection() {
                   Connection conn = null;
                        try {
                             Class.forName(DRIVER);
                             conn = DriverManager.getConnection(URL,USER,PASS);
                        } catch (ClassNotFoundException cnfe) {
                             System.err.print("Class not found");
                        } catch (SQLException sqle) {
                             System.err.print("SQLException");
                   return conn;
         public static void main(String args[]){
              StroedProcedure stp = new StroedProcedure();
              Connection con = stp.createConnection();
              try {
                   CallableStatement stproc_stmt = con.prepareCall("{call Account_Summary(?,?,?,?,?,?,?,?)}");
                   stproc_stmt.setString(1, "123456");
                   stproc_stmt.setDate(2, null);
                   stproc_stmt.setString(3, null);
                   stproc_stmt.setString(4, null);
                   stproc_stmt.setString(5, null);
                   stproc_stmt.setString(6, null);
                   stproc_stmt.setDate(7, null);
                   stproc_stmt.setDate(8, null);
                   stproc_stmt.registerOutParameter(1,Types.CHAR);
                   stproc_stmt.registerOutParameter(2,Types.DATE);
                   stproc_stmt.registerOutParameter(3,Types.CHAR);
                   stproc_stmt.registerOutParameter(4,Types.CHAR);
                   stproc_stmt.registerOutParameter(5,Types.CHAR);
                   stproc_stmt.registerOutParameter(6,Types.CHAR);
                   stproc_stmt.registerOutParameter(7,Types.DATE);
                   stproc_stmt.registerOutParameter(8,Types.DATE);
                   stproc_stmt.execute();
                   System.out.println("test "+stproc_stmt.getString(1));
                   ResultSet rs = stproc_stmt.executeQuery();
                  while (rs.next()){
                       System.out.println("result "+rs.getString("ACCPK"));
              } catch (SQLException e) {
                        e.printStackTrace();
         }And the stored procedure is
    CREATE OR REPLACE
    procedure Account_Summary (accpk in out char, incdt out date, bcur out char, bmark out char, tarTE out char, numHold out char, stDt out date, AsDt out date)
    is
    begin
    select account_pk, inception_date, base_currency, benchmark  into accpk, incdt, bcur, bmark
    from account a
    where a.Account_pk=accpk;
    select target_te, number_holdings, start_date, as_date into tarTE, numHold, StDt, AsDt
    from acc_summary asum
    where asum.account_pk=accpk;
    end Account_Summary;but it gives a exception ORA-01460: unimplemented or unreasonable conversion requested
    ORA-06512: at "REPRO.ACCOUNT_SUMMARY", line 4
    ORA-06512: at line 1
    i want to execute a stored procedure which has in , inout or out parameter
    but it can not work

    ========================
    In some contects varchar2 variable limit is 32512 characters... October 16, 2003
    Reviewer: Piotr Jarmuz from Poznan, Poland
    Interesting to note is the fact that varchar2 variables as parameters to stored
    procedures (in in/out out) may be "only" 32512 bytes long.
    I've checked this in Java and Perl. 32512 is the last value that works, for any
    bigger it throws:
    Exception in thread "main" java.sql.SQLException: ORA-01460: unimplemented or
    unreasonable conversion requested
    But in PL/SQL as you said 32767
    Regards,
    Piotr
    =================================
    This i got it from ask tom, well it make sense.... try checking your input with small numbers and strings
    Have fun

  • How can I show Search Form parameter values in URI of Results page?

    I have searched through these pages for posts relating to caching but haven't seen any that relate to my issue.
    We run a website that accesses data through search forms and returns matching data to the requester in a results page. The search criteria are entered in a form and the results page is generated by a servlet that gets the search parameter values that the user entered using the GET method.
    I would like rewrite this Search page using JDeveloper to bring our old code up to date and take advantage of new features that should help performance. In particular, I want to utilise the WebCache.
    To use the WebCache effectively, the cache needs to know what the search criteria were when it delivers a page so that repeated requests using the same criteria can be served directly from the cache.
    The data retrieved by a query may change from one search to to the next so I can't use time-based caching. But, I can use the WebCache Invalidation interface from the back-end DB server to flush old data out of the WebCache when it is changed, but to flush out the correct pages I need to know the parameter values passed.
    If I just follow the demos, it seems like the search parameters are all hidden in beans or something which means that the Web Cache can't be used for what I want. The parameter values are important.
    So my question is: is there a way of showing the search parameters used in the URI to the Results page? Can the old GET method of parameter passing be used (or can I somehow just put the old style parameters onto the URI?)
    Alternatively, is there a simple How To or Demo on how to use the Web Caching facility with JSF?
    (ADF Caching and Java Object caching do not seem appropriate for my needs. ADF caching seems to be limited to having fragments cached for fixed periods of time and Java Object caching is orders of magnitude slower and involves the Application Server.)
    Thanks for any advice,
    Andy

    Sorry - should have said I'm using JDev 10.1.3.0.4 with JSF & ADF BC.

  • Missing IN or OUT parameter at index in ODI

    HI All,
    I am using ODI 11.6
    I am facing the below error while working on sequence generator in ODI.I have pass the sequence as (:SP_OFFER_OFFER_ID_SEQ.NEXTVAL)
    Its a Table to Table mapping.
    ODI-1217: Session INT_TEMP_TO_OFFER (757011) fails with return code 17041.
    ODI-1226: Step INT_TEMP_TO_OFFER fails after 1 attempt(s).
    ODI-1240: Flow INT_TEMP_TO_OFFER fails while performing a Integration operation. This flow loads target table SP_OFFER.
    ODI-1228: Task INT_TO_OFFER (Integration) fails on the target ORACLE connection OWNER.
    Caused By: java.sql.SQLException: Missing IN or OUT parameter at index:: 1
    The code is
    /* DETECTION_STRATEGY = NOT_EXISTS */
    insert into      OWNER.SP_OFFER T
         CAMPGN_NO,
         CAMP_OFF
         , OFFER_ID
    select      CAMPGN_NO,
         CAMP_OFF
         , :SP_OFFER_OFFER_ID_SEQ.NEXTVAL
    from     OWNER.I$_SP_OFFER S
    where     IND_UPDATE = 'I'
    Please let me know how to resolve this
    Thanks,
    Lony

    Is this Database Sequence ? If yes , check the execution area. If everything looks fine and you are still getting error , try to execute this query directly in the Backend. This will make sure if this is a DB related issue or something is missing

  • PL/SQL Entity Object - Accessing Out parameter values in insertRow method

    Hi,
    I have the following pl/sql code which takes 4 input parameter and 1 out parameter.
    create or replace procedure xxfwk_emp_create(p_person_id IN NUMBER, p_first_name IN VARCHAR2, p_last_name IN VARCHAR2, p_sal IN NUMBER) is
    cursor c1 is select EMPLOYEE_ID from fwk_tbx_employees;
    v_status varchar2(1) := 's';
    BEGIN
    for v_c1 in c1 loop
    if v_c1.employee_id = p_person_id then
    p_error_msg:= 'Person with this id already exist';
    v_status := 'e';
    end if;
    exit when c1%notfound OR v_status='e' ;
    end loop;
    if v_status = 'e' then
    goto error;
    end if;
    INSERT INTO FWK_TBX_EMPLOYEES(EMPLOYEE_ID,
    FIRST_NAME,
    LAST_NAME,
    FULL_NAME,
    SALARY,
    CREATION_DATE,
    CREATED_BY,
    LAST_UPDATE_DATE,
    LAST_UPDATED_BY,
    LAST_UPDATE_LOGIN)
    VALUES(p_person_id,
    p_first_name,
    p_last_name,
    P_first_name||' '||p_last_name,
    p_sal,
    sysdate,
    fnd_global.user_id,
    sysdate,
    fnd_global.user_id,
    fnd_global.login_id);
    <<error>>
    null;
    END xxfwk_emp_create;
    I have following code in EO Impl class
    public void insertRow()
    try
    OADBTransactionImpl oadbTrans = (OADBTransactionImpl)getDBTransaction();
    String s = "begin xxfwk_emp_create(p_person_id=>:1, p_first_name=>:2, p_last_name=>:3, p_sal=>:4, p_error_msg=>:5);end;";
    OracleCallableStatement oraCall = (OracleCallableStatement)oadbTrans.createCallableStatement(s,-1);
    oraCall.setNUMBER(1,getEmployeeId());
    oraCall.setString(2,getFirstName());
    oraCall.setString(3,getLastName());
    oraCall.setNUMBER(4,getSalary());
    *< How to access Out Parameter from The procedure >*
    oraCall.execute();
    catch(SQLException sqlException)
    throw OAException.wrapperException(sqlException);
    catch(Exception exception)
    throw OAException.wrapperException(exception);
    In this insertRow i want to get the error message (out param) and throw this message as exception in OA page.
    What changes i need to do in my page?
    Regards,
    Ram

    Thanks sumit..
    I changed the code as below still i am not getting the error message on the page.
    In jdeveloper i am successfully printing the error message.
    here is the code..
    try
    OADBTransactionImpl oadbTrans = (OADBTransactionImpl)getDBTransaction();
    String s = "begin xxfwk_emp_create(p_person_id=>:1, p_first_name=>:2, p_last_name=>:3, p_sal=>:4, p_error_msg=>:5);end;";
    OracleCallableStatement oraCall = (OracleCallableStatement)oadbTrans.createCallableStatement(s,-1);
    oraCall.setNUMBER(1,getEmployeeId());
    oraCall.setString(2,getFirstName());
    oraCall.setString(3,getLastName());
    oraCall.setNUMBER(4,getSalary());
    String p_error_msg = null;
    System.out.println("Error message before call "+p_error_msg);
    Types OracleTypes;
    oraCall.registerOutParameter(5,OracleTypes.VARCHAR);
    if (p_error_msg!=null)
    throw new OAException(p_error_msg,OAException.ERROR);
    oraCall.execute();
    p_error_msg = oraCall.getString(5);
    System.out.println("Error message after call "+p_error_msg);
    catch(SQLException sqlException)
    throw OAException.wrapperException(sqlException);
    catch(Exception exception)
    throw OAException.wrapperException(exception);
    Regards,
    Ram

  • How to pass the dynamic request parameter value $fieldName:IsSelected for framework folder service FLD_PROPAGATE?

    Hello All,
    I created a WSDL for Framework folder service FLD_PROPAGATE  and FLD_PROPAGATE service has following two required request parameter:
    $fieldName:isSelected: Set to 1 to propagate the specified field.
    $fieldName: The value of the field to propagate
    So, I am facing issue in passing the parameter $fieldName:isSelected.
    I tried to pass the request parameter as mentioned below in SOAP UI request payload but still this is not working and error message is: "Unable to propagate. Please select at least one field to propagate"
    <csx:fSecurityGroup:IsSelected>1</csx:fSecurityGroup:IsSelected>
    <csx:fFolderGUID>C7F5CBB4E54A790E21E18CE378B16EEB</csx:fFolderGUID>
    <csx:fSecurityGroup>Public</csx:fSecurityGroup>
    Could you please suggest for the correct way to pass these parameter values? If anyone have sample WSDL for this service please share?
    Here is the complete service definition:
    FLD_PROPAGATE
    Service that propagates metadata down through the folder structure in Folders.
    Service Class: intradoc.folders.FoldersService
    Location: IdcHomeDir/resources/frameworkfolders_service.htm
    Required Service Parameters
    $fieldName:isSelected: Set to 1 to propagate the specified field.
    $fieldName: The value of the field to propagate

    Hello All,
    I created a WSDL for Framework folder service FLD_PROPAGATE  and FLD_PROPAGATE service has following two required request parameter:
    $fieldName:isSelected: Set to 1 to propagate the specified field.
    $fieldName: The value of the field to propagate
    So, I am facing issue in passing the parameter $fieldName:isSelected.
    I tried to pass the request parameter as mentioned below in SOAP UI request payload but still this is not working and error message is: "Unable to propagate. Please select at least one field to propagate"
    <csx:fSecurityGroup:IsSelected>1</csx:fSecurityGroup:IsSelected>
    <csx:fFolderGUID>C7F5CBB4E54A790E21E18CE378B16EEB</csx:fFolderGUID>
    <csx:fSecurityGroup>Public</csx:fSecurityGroup>
    Could you please suggest for the correct way to pass these parameter values? If anyone have sample WSDL for this service please share?
    Here is the complete service definition:
    FLD_PROPAGATE
    Service that propagates metadata down through the folder structure in Folders.
    Service Class: intradoc.folders.FoldersService
    Location: IdcHomeDir/resources/frameworkfolders_service.htm
    Required Service Parameters
    $fieldName:isSelected: Set to 1 to propagate the specified field.
    $fieldName: The value of the field to propagate

  • How to use SYSDATE as a default value of a bind variable in a query report?

    Hi,
    I want to use SYSDATE as default value for a bind variable in Query based report.
    I don't see any way to do it, someone helps?
    Thanks a lot.
    Paulo.

    You can aslo use #sysdate directly.
    Hi,
    The way I'm doing in my report is, I have a database function (f_ret_sysdate) with the following code
    create function f_ret_sysdate return varchar2
    begin
    return to_char(sysdate,'mm/dd/yyyy');
    end;
    Now, in the 'Customization Form Display Options' section of the report I'm calling this function as #f_ret_sysdate in the default value field of corresponding bind variable to display SYSDATE with the format.
    Hope this helps!...
    -Krishnamurthy

  • How to assign store proc parameter to other parameter memebers?

    i really do not want to decalare t_param2 and check if default value is null of param2 then assign param1 to it. Any way i can achieve the following without declaring temp variables.?????
    create or replace procedure Proc1( param1 varchar2, param2 varchar2 := param1)
    IS
    BEGIN
    null;
    END;
    show errors
    1/54 PLS-00227: subprogram 'in' formal PARAM1 is not yet denotable
    0/0 PL/SQL: Compilation unit analysis terminated

    I think this is one of the solution...
    CREATE OR REPLACE PROCEDURE proc1 (param1 VARCHAR2, param2 VARCHAR2)
    IS
    ---p2 VARCHAR2(100);
    procedure p1(param1 varchar2, param2 varchar2)
    IS
    BEGIN
    DBMS_OUTPUT.PUT_LINE('param1-->'||param1||' param2 -->'||param2);
    END;
    BEGIN
    p1(param1,nvl(param2,param1));
    dbms_output.put_line(param1||':'||param2);
    END proc1;
    show errors;
    set serveroutput on
    exec proc1('A', 'B');
    set serveroutput on
    exec proc1('A', null);

  • How to clear a default condition / parameter value in a Discoverer Viewer ?

    Hi there,
    Appreciate if anyone can help with what I am trying to do below in Discoverer10g:-
    1. In Desktop we created a workbook with a parameter and we set the default value of the parameter as '%%'. This is so that all values are selected for that parameter unless the user over-writes it by picking values from the LOV.
    2. When we run the workbook in Desktop, and pick a value out of a LOV, the system automatically remove the '%%' and substituted with the values picked from the LOV. This is working well.
    3. However, when we published the workbook to our Disco Viewer users, on the parameter screen, when a user picks values out of the LOV, the system DOES NOT remove the '%%' automatically, and appends the picked values to the list. Of course this makes the report select all values for that parameter.
    4. To resolve the problem, the Viewer user has to manually remove the default '%%' before picking values out of the LOV. Often they forget to do that and trust the value reported on the worksheet.
    5. We believe some sort of a "REPLACE '%' with BLANK" function on clicking the "Move" button will remove the '%%' values when we pick values from LOV in the parameter screen. But we do not know how to do this.
    If anyone has successfully done the above and share his experience, that will be much appreciated.
    Thank you.

    Hi there,
    Thanks for your feedback.
    Our workbooks mostly have muitii-item parameters where the users can pick more than one value.
    I have created a test workbook in Desktop with a mutil-value parameter. After picking up multiple values from the LOV, the '%%' default automatically get sover-written.
    I shared this same workbook to a Viewer user.
    In Viewer, after picking multiple values from the left window and clicking the [Move] button, the '%%' value stays. Wonder if anything can be done to remove the '%%' in Viewer after the user has picked a value and the [Move] button is clicked.
    Further help / comments appreciated.
    Thanks again for your help.
    Regards

  • How to assign and display an attribute value from backing bean?

    Hello all,
    I am using Jdev 11g. I have a form page which has two inputText attributes The first one implements a valueChangeListener feature. When the user enters a value in the first field, a backing bean function will be invoked through the valueChangeListener . In this backing bean function, based on the value in the first field, I want to assign the value to the second field and display it on the page. Can somebody help me how to achieve this?
    Thanks,
    John

    Hi John,
    Here is small example.
    Create two string variables in your backing bean and generate accessors for them.
        private String text;
        private String text1;
        public void setText(String text) {
            this.text = text;
        public String getText() {
            return text;
        public void setText1(String text1) {
            this.text1 = text1;
        public String getText1() {
            return text1;
        }Bind this variables to the value property of the input texts you have. Add the valuechangedlistener for the first input text (and also set autosubmit to true for that item). Also, add the id of the first input text as partial triggers for the second input text. Like,
            <af:inputText label="Label 1"
                          binding="#{backingBeanScope.backing_untitled1.it1}"
                          id="it1"
                          valueChangeListener="#{backingBeanScope.backing_untitled1.textValueChanged}" autoSubmit="true"
                          value="#{backingBeanScope.backing_untitled1.text}"/>
            <af:inputText label="Label 2"
                          binding="#{backingBeanScope.backing_untitled1.it2}"
                          id="it2"
                          value="#{backingBeanScope.backing_untitled1.text1}"
                          partialTriggers="it1"/>Finally, put the logic on your value changed listener. Like,
        public void textValueChanged(ValueChangeEvent vce){
            this.setText1("Hi " + vce.getNewValue());
        }Now, when you run the page and enter your name in the first input text, the second input text will display Hi <your_name>
    HTH.
    -Arun

  • How to pass a 'one of' parameter value to a sub-report

    I'm using CRXI.
    If I have a parameter which is a 'one of', what are my options for passing the values of that parameter to a subreport?
    Specifically I would like to know:
    Is this a good solution: convert the 'one of' parameter to multiple formulas(one forumula for each of the possible values), and then link the subreport to the main report on each of those values?

    Thanks for responding, but I dont think you understood my question.
    Let me ask the question again a little differently, here are my assumptions, maybe they are incorrect.
    1. Parameters are passed to sub reprots by setting the parameter equal to a forumla, and then linking the sub report to main report through the formula.
    2. If the Parameter is a 'one of' (ie can be multiple values), it can only be set equal to a forumula if you make the forumula an array.
    3. You cant link a sub report to a main report on two formulas which are arrays.
    4.Therefore how do you handle this situation?

  • How to assign a comman seperated string value in the IN Clause of SELECT st

    In table A I have following values
    ID price
    1 100
    2 200
    3 300
    4 400
    6 500
    Now in table B, I have following values
    Product price combi
    OIL 600 ‘1’,’2’,’3’
    What I need to do is, to first get the combi value from table B and then get the count from table A.
    In above condition, it should return 3…
    create or replace procedure amit_combi_test
    as
    v_combi varchar2(100);
    tot_row number(10);
    cursor table_combi is
    select combi
    from B;
    BEGIN
    OPEN table_combi;
    LOOP
    FETCH table_combi into v_combi;
    EXIT WHEN table_combi%NOTFOUND;
    dbms_output.put_line (v_combi);
    select count(1) INTO tot_row
    from A
    where ID in (v_combi);
    dbms_output.put_line (to_char(tot_row));
    END LOOP;
    CLOSE table_combi;
    END;
    But the problem is… it shows the value of variable tot_row = 0; it should come 3…

    ace_friends22 wrote:
    Hi All,
    TABLE A and TABLE B does not have only those values...
    in table B i may have value of combi column = '4','6'.. in that case i should get the count = 2.
    The idea to get the count is to decide how many times i need to iterate the logic.
    for i in tot_row LOOP
    logic
    ....You mean like this?
    SQL> ed
    Wrote file afiedt.buf
      1  with A as (select 1 as id, 100 as price from dual union all
      2             select 2, 200 from dual union all
      3             select 3, 300 from dual union all
      4             select 4, 400 from dual union all
      5             select 6, 500 from dual)
      6      ,B as (select 'OIL' as product, 600 as price, q'['1','2','3']' as combi from dual union all
      7             select 'FRED', 400, q'['1','3']' from dual)
      8  --
      9  select b.product, count(*) as cnt
    10  from b join a on (a.id in (select to_number(regexp_substr(b.combi,'[0-9]+',1,rownum))
    11                             from dual
    12                             connect by rownum <= length(regexp_replace(b.combi,q'{[0-9']}'))+1)
    13                   )
    14* group by b.product
    SQL> /
    PROD        CNT
    FRED          2
    OIL           3
    SQL>

Maybe you are looking for

  • VF02 - Releasing billing document to accounting

    Hi SAP Gurus, Following error message is displayed while trying to release a billing document (Credit Memo) to accounting: "Tax statement item missing for tax code TB". I guess this should be in relation to pricing procedure. Could you please provide

  • MacBookPro3,1 runs well with 10.6.8 but can't install Mavericks or Mountain Lion

    I have an old "Santa Rosa" MBP from August 2007.  It runs 10.6.8 perfectively well but I thought I'd install Mavericks to see what the future is like.  Unfortunately it failed midway through the install with a "hardware issue" message and a request f

  • CSS Layout Anomoly

    I have been trying to be a very good boy recently and learn to layout a website using CSS and layers. I have created a test page that pretty much seems to work. I have used a wrapper div with a background image so that the main body column and the ri

  • Corrupt project in FCPX due to font failure

    Hi, fcpx crashes as soon as there is a certain project being included. The crash log announces the following: Thread 60 Crashed:: BGTask: MEBackgroundLoadManager  Dispatch queue: com.apple.root.default-priority 0   com.apple.motion.TextFramework    0

  • #unavailable on User defined variables in WEBI  using BEX (BO 4.0)

    Hi Experts, I am using Business Objects 4.0 SP2   with SAP BEX. I am using WebI and from WebI I direcltly connect to BEX connection and pull the report. I have a field in which i need to do like this if the value of a is between 1 to 5 then the resul