Need help on usuage of values

Hi all,
In a package i have some functions, one function named f1() for example am having and populating some data
inside this function in a cursor and doing some process.
Is there anyway that i can use these function f1() cursor values into another function f5() for example.
Can it be done because i have a requriment like below.
A example code
  function f1()
      cursor c1
        select a,b,c from t1 where join conditons.
function f5()
If type ='P' Then
    insert into demo_table_1
    (col1, colu2,co3)
     values
     (a,b,c)
else  If type ='q' Then
        insert into demo_table_2
    (col1, colu2,co3)
     values
     (a,b,c)
return .......   
thanks in advance.

if your function is included on the package try moving the cursor on the define variable area:
  create or replace package pkg_my_code as
    cursor c1
      select a,b,c from t1 where ...
    function function1() return ...
    end;
    function function5() return ...
    end;
  end;
  /

Similar Messages

  • Urgent please- need help to retreive all values within a range

    Hi,
    I need to retreive all the values(ID) within a range no matter if it is available in the database or not. I just need this in a sql query not a stored proc.
    for ex:
    select id, name, age
    from employee
    where id between (1 and 10)
    It returns
    id name age
    1 x 22
    3 y 26
    4 z 23
    10 c 32
    I need a query which should return values as follows.
    id name age
    1 x 22
    2
    3 y 26
    4 z 23
    5
    6
    7
    8
    9
    10 c 32
    quick replies will be appreciated.

    This is one way of doing
    select decode(id,null,lev,id),name,age from employee,(select level lev from dual
    connect by level < 11)
    where employee.id(+)=lev
    The above will display between 1 and 10. If you want to specify some other range then the below query will do,
    select decode(id,null,lev,id),name,age from employee,(select level lev from dual
    connect by level <=10
    minus
    select level lev from dual
    connect by level <5)
    where employee.id(+)=lev
    The above query will display between 5 and 10

  • Need help in Setting a value of an attribute

    Hi,
    I have a requirement where i need to set a value for an attribute in duplicate popup.
    I am able to retrieve the current values with the method
    o_partner->get_properties( IMPORTING es_attributes = x_attributes ).
    After fetching the value, i am programatically setting 
    x_attributes-Soldto = 'X'.
    o_partner->set_properties( exPORTING is_attributes = x_attributes ).
              lv_collection1->add( o_partner ).
              lr_core = cl_crm_bol_core=>get_instance( ).
              lr_core->modify( ).
    I am not sure, what is missed out in my logic but the value is not shown on WEB UI.
    Any pointers will b of gr8 help.
    Thanks,
    Udaya

    Got the solution from other source

  • Need help understanding component id values in a region

    Hi, I have an adf region that is assigned the id of r1. The region uses a .jsff that has various UI components, for example a commandButton assigned the id of cb1. I'm trying to understand how ADF creates the id for the button that's rendered.
    For example, in this case, the id of the button is something like a:b:r1:1:cb1 (where a & b are the ids of other parent naming containers). What does the ":1" in r1:1 indicate? It seems like it's some index value and not referring to a naming container, but not sure what this means in the context of a region.
    Other times, I've noticed that the id of the same button is something like a:b:r1:0:cb1. In this case, r1:1 got changed to r1:0. What is the meaning of ":1" and "{noformat}:0{noformat}" in the ids and why would this change?

    I am assuming that your mum's email address is a sub-account of your dad's.
    If it is you need to set up a BTID for her. This will allow her email account to be managed and only accessed by her rather than being managed by your dad.
    If your dad is the account holder log onto his MyBT and go to "My Extras" and you will see "Manage BTMail" Click on that and you should see their email accounts. Make sure that you "gift" your mum's email to her.
    You should now set up a BTID using your mum's email address and password as the BTID username and password. Once you have done that she should be able to log onto MyBT using her BTID and you should be able to log onto her email.
    See links which might help
    http://bt.custhelp.com/app/answers/detail/a_id/45822/c/346,6769,7012/related/1
    http://bt.custhelp.com/app/answers/detail/a_id/48680/c/346,6769,7012/related/1
    You should make your dad's BTID the same as his BT email address and password. It makes it easier to manage and allow access to other BT features. It is his email address and password that you put onto Outlook Express.

  • Need Help: Dynamically displaying parameter values for a procedure.

    Problem Statement: Generic Code should display the parameter values dynamically by taking "package name" and "procedure name" as inputs and the values needs to be obtained from the parameters of the wrapper procedure.
    Example:
    a) Let us assume that there is an application package called customer.
    create or replace package spec customer
    as
    begin
    TYPE cust_in_rec_type IS RECORD
    cust_id NUMBER,
    ,cust_name VARCHAR2(25) );
    TYPE cust_role_rec_type IS RECORD
    (cust_id NUMBER,
    role_type VARCHAR2(20)
    TYPE role_tbl_type IS TABLE OF cust_role_rec_type INDEX BY BINARY_INTEGER;
    Procedure create_customer
    p_code in varchar2
    ,p_cust_rec cust_in_rec_type
    ,p_cust_roles role_tbl_type
    end;
    b) Let us assume that we need to test the create customer procedure in the package.For that various test cases needs to be executed.
    c) We have created a testing package as mentioned below.
    create or replace package body customer_test
    as
    begin
    -- signature of this wrapper is exactly same as create_customer procedure.
    procedure create_customer_wrapper
    p_code in varchar2
    ,p_cust_rec customer.cust_in_rec_type
    ,p_cust_roles customer.role_tbl_type
    as
    begin
    //<<<<<---Need to display parameter values dynamically for each test case-->>>>>
    Since the signature of this wrapper procedure is similar to actual app procedure, we can get all the parameter definition for this procedure using ALL_ARGUMENTS table as mentioned below.
    //<<
    select * from ALL_ARGUMENTS where package_name = CUSTOMER' and object_name = 'CREATE_CUSTOMER'
    but the problem is there are other procedures exists inside customer package like update_customer, add_address so need to have generalized code that is independent of each procedure inside the package.
    Is there any way to achieve this.
    Any help is appreciated.
    // >>>>
    create_customer
    p_code => p_code
    ,p_cust_rec => p_cust_rec
    ,p_cust_roles => p_cust_roles
    end;
    procedure testcase1
    as
    l_cust_rec customer.cust_in_rec_type ;
    l_cust_roles customer.role_tbl_type;
    begin
    l_cust_rec.cust_id := 1;
    l_cust_rec.cust_name := 'ABC';
    l_cust_roles(1).cust_id := 1;
    l_cust_roles(1).role_type := 'Role1';
    create_customer_wrapper
    p_code => 'code1'
    ,p_cust_rec => l_cust_rec
    ,p_cust_roles => l_cust_role
    end;
    procedure testcase2
    as
    l_cust_rec customer.cust_in_rec_type ;
    l_cust_roles customer.role_tbl_type;
    begin
    l_cust_rec.cust_id := 2;
    l_cust_rec.cust_name := 'DEF';
    l_cust_roles(1).cust_id := 2;
    l_cust_roles(1).role_type := 'Role2';
    create_customer_wrapper
    p_code => 'code2'
    ,p_cust_rec => l_cust_rec
    ,p_cust_roles => l_cust_role
    end;
    end;

    Not possible to dynamically in a procedure, deal with the parameter values passed by a caller. There is no struct or interface that a procedure can use to ask the run-time to give it the value of the 1st or 2nd or n parameter.
    There could perhaps be some undocumented/unsupported method - as debugging code (<i>DBMS_DEBUG</i>) is able to dynamically reference a variable (see Get_Value() function). But debugging requires a primary session (the debug session) and the target session (session being debugged).
    So easy answer is no - the complex answer is.. well, complex as the basic functionality for this do exists in Oracle in its DBMS_DEBUG feature, but only from a special debug session.
    The easiest way would be to generate the wrapper itself, dynamically. This allows your to generate code that displays the parameter values and add whatever other code needed into the wrapper. The following example demonstrates the basics of this approach:
    SQL> -- // our application proc called FooProc
    SQL> create or replace procedure FooProc( d date, n number, s varchar2 ) is
      2  begin
      3          -- // do some stuff
      4          null;
      5  end;
      6  /
    Procedure created.
    SQL>
    SQL> create or replace type TArgument is object(
      2          name            varchar2(30),
      3          datatype        varchar2(30)
      4  );
      5  /
    Type created.
    SQL>
    SQL> create or replace type TArgumentList is table of TArgument;
      2  /
    Type created.
    SQL>
    SQL> -- // create a proc that creates wrappers dynamically
    SQL> create or replace procedure GenerateWrapper( procName varchar2 ) is
      2          procCode        varchar2(32767);
      3          argList         TArgumentList;
      4  begin
      5          select
      6                  TArgument( argument_name, data_type )
      7                          bulk collect into
      8                  argList
      9          from    user_arguments
    10          where   object_name = upper(procName)
    11          order by position;
    12 
    13          procCode := 'create or replace procedure Test'||procName||'( ';
    14          for i in 1..argList.Count
    15          loop
    16                  procCode := procCode||argList(i).name||' '||argList(i).datatype;
    17                  if i < argList.Count then
    18                          procCode := procCode||', ';
    19                  end if;
    20          end loop;
    21 
    22          procCode := procCode||') as begin ';
    23          procCode := procCode||'DBMS_OUTPUT.put_line( '''||procName||''' ); ';
    24 
    25          for i in 1..argList.Count
    26          loop
    27                  procCode := procCode||'DBMS_OUTPUT.put_line( '''||argList(i).name||'=''||'||argList(i).name||' ); ';
    28          end loop;
    29 
    30          -- // similarly, a call to the real proc can be added into the test wrapper
    31          procCode := procCode||'end;';
    32 
    33          execute immediate procCode;
    34  end;
    35  /
    Procedure created.
    SQL>
    SQL> -- // generate a wrapper for a FooProc
    SQL> exec GenerateWrapper( 'FooProc' );
    PL/SQL procedure successfully completed.
    SQL>
    SQL> -- // call the FooProc wrapper
    SQL> exec TestFooProc( sysdate, 100, 'Hello World' )
    FooProc
    D=2011-01-07 13:11:32
    N=100
    S=Hello World
    PL/SQL procedure successfully completed.
    SQL>

  • Need help to calculate delta value

    Can someone please help me with this?
    I have a source table like:
    device        index     value                     time
        a              1         15               2009-07-07 12:00:00
        a              1         20               2009-07-07 13:00:00
        a              1         25               2009-07-07 14:00:00
        a              1         30               2009-07-07 15:00:00
        a              2         10               2009-07-07 12:00:00
        a              2         20               2009-07-07 13:00:00
        a              2         30               2009-07-07 14:00:00
        a              2         35               2009-07-07 15:00:00
        a              3         30               2009-07-07 13:00:00
        a              3         40               2009-07-07 15:00:00And the final table I need to generate is like
    device        index     value                     time
        a              1         5               2009-07-07 13:00:00
        a              1         5               2009-07-07 14:00:00
        a              1         5               2009-07-07 15:00:00
        a              2         10             2009-07-07 13:00:00
        a              2         10             2009-07-07 14:00:00
        a              2         5               2009-07-07 15:00:00
        a              3         30             2009-07-07 13:00:00
        a              3         0               2009-07-07 14:00:00
        a              3         40             2009-07-07 15:00:00Thanks a lot for your help!

    Sounds like you need to fill in some gaps.
    You can use a partitioned join to fill in the gaps, then use the analytic funcitons. See [http://download.oracle.com/docs/cd/B19306_01/server.102/b14223/analysis.htm#sthref1836] for more info on partitioned joins.
    Here's my original query with an updated middle (t2 now t3) query
    with t1 as (select 'a' device, 1 IND, 15 "VALUE", to_date('2009-07-07 12:00:00','rrrr-mm-dd hh24:mi:ss') "TIME" from dual
      union all select 'a', 1, 20, to_date('2009-07-07 13:00:00','rrrr-mm-dd hh24:mi:ss') from dual
      union all select 'a', 1, 25, to_date('2009-07-07 14:00:00','rrrr-mm-dd hh24:mi:ss') from dual
      union all select 'a', 1, 30, to_date('2009-07-07 15:00:00','rrrr-mm-dd hh24:mi:ss') from dual
      union all select 'a', 2, 10, to_date('2009-07-07 12:00:00','rrrr-mm-dd hh24:mi:ss') from dual
      union all select 'a', 2, 20, to_date('2009-07-07 13:00:00','rrrr-mm-dd hh24:mi:ss') from dual
      union all select 'a', 2, 30, to_date('2009-07-07 14:00:00','rrrr-mm-dd hh24:mi:ss') from dual
      union all select 'a', 2, 35, to_date('2009-07-07 15:00:00','rrrr-mm-dd hh24:mi:ss') from dual
      union all select 'a', 3, 30, to_date('2009-07-07 13:00:00','rrrr-mm-dd hh24:mi:ss') from dual
      union all select 'a', 3, 40, to_date('2009-07-07 15:00:00','rrrr-mm-dd hh24:mi:ss') from dual
    ), t3 as (
    select t1.device
         , t1.ind
         , nvl(t1.value,lag(nvl(t1.value,0)) over (partition by t1.device, t1.ind order by t2.time))
           - lag(nvl(t1.value,0)) over (partition by t1.device, t1.ind order by t2.time) "VALUE"
         , t2.time
      from t1
      PARTITION by ( t1.device, t1.ind)
      right join (select distinct time from t1) t2
        on t1.time = t2.time
    select * from t3 where value is not null
    DEVICE IND                    VALUE                  TIME                     
    a      1                      5                      07-JUL-2009 13:00:00     
    a      1                      5                      07-JUL-2009 14:00:00     
    a      1                      5                      07-JUL-2009 15:00:00     
    a      2                      10                     07-JUL-2009 13:00:00     
    a      2                      10                     07-JUL-2009 14:00:00     
    a      2                      5                      07-JUL-2009 15:00:00     
    a      3                      30                     07-JUL-2009 13:00:00     
    a      3                      0                      07-JUL-2009 14:00:00     
    a      3                      40                     07-JUL-2009 15:00:00     
    9 rows selectedNote: I had to finegle the NVL function first half of the value expression to get the result to be 0 instead of -30. If you want it to be -30 instead just change that nvl function to nvl(t1.value,0) instead.
    Edited by: Sentinel on Jul 8, 2009 4:40 PM

  • Need help in grouping data Value.

    Hi Techies,
    I have a requirement where i need to group the rating acording to issuer country and show the aggegated data value in the report.
    Country
    Rating
    Value
    US
    A
    324
    US
    AA
    43
    Europe
    C
    8
    Canada
    A
    34
    Here in the below tables we are showing aggegated data for US . We are having 2 ratings for US so we grouped together and showing it in the one row .
    Country
    Rating
    Value
    US
    A/AA
    367
    Europe
    C
    8
    Canada
    A
    34
    Please suggest if we can achieve this in webi.

    Hi Harpreet,
    Create a variable for count of ratings,
    =count([RATING])
    Create a another variable for rating
    =If [COUNT]=2 Then "A/AA" Else [RATING]
    Regards,
    Samatha B

  • Need Help ::  Current row attribute value returning null

      Hi Frds,
    I am facing the problem that
    Current row attribute value returning null............ even though value is there..... plz.. he
    This is the code in PFR
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    if (pageContext.getParameter("queryBtn")!= null)
        String  pPersonId = pageContext.getParameter("ctrlPersonId");
         String rowReference = pageContext.getParameter(EVENT_SOURCE_ROW_REFERENCE);
         OptionsVORowImpl curRow = (     OptionsVORowImpl) am.findRowByRef(rowReference);
        String dtlsItem =  (String)curRow.getFlexValue();   /*  this is returning null value */
    /*  here creating  the hashmap and calling the page with the hashmap*/
    Thanks & Regards,
    jaya
    Message was edited by: 9d452cf7-d17f-4d1e-8e0e-b22539ea8810

    Hi Jaya,
    You want to catch Flexfield values?
    Try below code for catch value.
    OAApplicationModule am = pageContext.getApplicationModule(webBean);
    if (pageContext.getParameter("queryBtn")!= null)
    OADescriptiveFlexBean dfb = (OADescriptiveFlexBean)webBean.findChildRecursive("flexDFF"); //get the DFF bean
    OAWebBean dffbean = (OAWebBean)dfb.findChildRecursive("flexDFF0"); //get the field that applies to the attribute1 column that is being rendered
    OAMessageStyledTextBean Stylebean = (OAMessageStyledTextBean)dffbean;
    String dtlsItem  = (String)Stylebean.getText(pageContext);
    /*  here creating  the hashmap and calling the page with the hashmap*/
    Thanks,
    Dilip

  • Need Help In Displaying Numberic Values In app.alert

    How can I display a two placed decimal value in an app.alert, correctly?
    app.alert("Invalid  - " + this.getField("Sub-Total-2").value, 1);
    In the above alert, Sub-Total-2 is defined with 2 decimal places, within its Text Field Properties. But if its value is 2.50, it is displayed as 2.5 from within the alert. And still othertimes, its value is displayed values such as 56.33333333, when it should display 56.40
       

    Use util.printf()

  • How to enable firefox addon if it is disbaled.(need help in pref.js values)

    Addon are coming but they are in disbaled mode.how to enable those addons using pref.js for all users.

    i am using firefox 15.0 .i added below properties in prefs.js file where the file will be there in "c:\program files\mozilla firefox\defaults\prefs\prefs.js"
    pref("extensions.autoDisableScopes", 0); pref("extensions.enabledScopes", 15); pref("extensions.enabledAddons", "[email protected]:1.9.0,[email protected]:1.9.0,[email protected]:1.9.0,[email protected]:1.9.0,{a6fd85ed-e919-4a43-a5af-8da18bda539f}:1.9.0,{972ce4c6-7e08-4474-a285-3208198ce6fd}:15.0");
    still the addons are coming in disabled mode.
    Please help me to findout a solution for enableing addons in silent mode(or using prefs.js) for all users ina machine.

  • Need help - ResourceBundle - formated string value (and multi-line string)

    Hi
    Can I put a value for key on many rows and formatted??
    Ex.: Into a file properties can I put
    key =
    My
    name
    is
    JTonic
    When I try to get the value for key, I get "". Can I get "My name is JToniC" ???
    Thx in advance.

    http://java.sun.com/j2se/1.4.2/docs/api/java/util/Properties.html#load(java.io.InputStream)
    The logical line holding all the data for a key-element pair may be spread out across several adjacent natural lines by escaping the line terminator sequence with a backslash character, \.

  • Need to get the selected values from the selectManyShuttle

    Hi,
    I am using ADF11g newer version.
    I have a selectManyShuttle and a command button. Need to insert all the selected values on the right hand side of the selectManyShuttle into a database table.
    I created the selectManyShuttle with the values. Need help in getting the values on the right hand side.
    <af:selectManyShuttle value="#{bindings.UserMgmtVO1.inputValue}"
    id="sms2">
    <f:selectItems value="#{bindings.UserMgmtVO1.items}"
    id="si6"/>
    </af:selectManyShuttle>
    Any sample code or link is really appreicated.
    Thanks

    Thanks for the reply.
    I am using a View Object and I dropped it as SelectManyShuttle
    <af:selectManyShuttle value="#{bindings.UserMgmtVO1.inputValue}"
    id="sms2"
    valueChangeListener="#{POBacking.getSelectedValues}"
    valuePassThru="true"
    autoSubmit="true">
    <f:selectItems value="#{bindings.UserMgmtVO1.items}"
    id="si6"/>
    </af:selectManyShuttle>
    public void getSelectedValues(ValueChangeEvent valueChangeEvent) {
    System.out.println("Testing Shuttle");
    ArrayList list = new ArrayList(Arrays.asList(valueChangeEvent.getNewValue()));
    String val = "";
    String sqlStmt = "";
    try {
    if (list != null) {
    for (int i = 0; i < list.size(); i++) {
    int l = list.size() - 1;
    val = list.get(l).toString(); //returns , delimited string
    System.out.println(" value:" + val);
    if (val != null) {
    val = val.replaceAll("[\\[\\]]", ""); //remove []
    StringTokenizer st = new StringTokenizer(val, ",");
    int nto = st.countTokens();
    for (int j = 0; j < nto; j++) {
    String users = st.nextToken().trim();
    System.out.println("Users:" + users);
    //sqlStmt = " update xxpp_project_clip set clip_status='true', clip_seq = "+j * 10+
    // " where project_id = "+rHdr.getAttribute("ProjectId") +
    // " and clip_name ='"+ clip_Name +"'";
    //System.out.println("sqlStmt:" + sqlStmt);
    //stmt.executeUpdate(sqlStmt);
    //am.getDBTransaction().commit();
    //if (stmt != null)
    // stmt.close();
    // am.getDBTransaction().commit();
    } catch (Exception ex) {
    ex.printStackTrace();
    I don't see the values in the list.
    I gets printed as
    value:[Ljava.lang.Integer;@1b10691
    Users:Ljava.lang.Integer;@1b10691
    how to get the individual values in the list?
    Thanks
    Saru

  • Need Help, retrieving a combo boxes actual/print/visible value instead of the export value.

    Hello,
    I need help, retrieving a combo boxes actual value, not the export value.
    I have a combo box with multiple options to select from.
    each of those selections has a separate export value, which is in the form of a number, which I use to calculate dates in a separate field.
    However, I have another field that i want to retrieve the, users selected value, which is text, from the combo box instead of the export value.
    Is there an easy way to do this.
    This is what I am currently using. But like I said the results are that I retrieve the export value and not the selected text value.
    event.value = this.getField("_Arugula").valueAsString;
    Thanks

    First get the currentValueIndices property of the combo box and use it with the getItemAt field method to return (what I call) the display value. Something like:
    var f = getField("combo1");
    var display_value = f.getItemAt(f.currentValueIndices, false);
    See the documentation for more information

  • Need help with the session state value items.

    I need help with the session state value items.
    Trigger is created (on After delete, insert action) on table A.
    When insert in table B at least one row, then trigger update value to 'Y'
    in table A.
    When delete all rows from a table B,, then trigger update value to 'N'
    in table A.
    In detail report changes are visible, but the trigger replacement value is not set in session value.
    How can I implement this?

    You'll have to create a process which runs after your database update process that does a query and loads the result into your page item.
    For example
    SELECT YN_COLUMN
    FROM My_TABLE
    INTO My_Page_Item
    WHERE Key_value = My_Page_Item_Holding_Key_ValueThe DML process will only return key values after updating, such as an ID primary key updated by a sequence in a trigger.
    If the value is showing in a report, make sure the report refreshes on reload of the page.
    Edited by: Bob37 on Dec 6, 2011 10:36 AM

  • Need help in WAD 7.0 - anaylsis item cell value as filter to another web...

    Hi ,
    I need help in WAD 7.0
    i have 2 web items, analyis item 1 & 2
    when user clicks any cell value in column xxx of analysis item1, then i need to filter the analysis item 2 values for  column xxx  , for that user clicked value.
    how do i enable this ?

    Hi.
    You can try the nxt approach:
    1. in analysis item A (first) properties define in "behaviour" -> "row selection" = "single with command".
    2. set this command to "SET_SELECTION_STATE_BY_BINDING".
    3. define "data provider affected" = your second data provider for analysis item B.
    4. in "selection binding" set needed variables to binding type "VARIABLE"
    In this case, when you select any row in analysis item A some variables will be populatd from this row and affect on analys item B (dataprovider B).
    Regards.

Maybe you are looking for

  • InDesign or PDF to XPS

    Hi everyone, One of the agencies I work with has a client who wishes XPS for web development. The native application files are InDesign and the agency has used the XPS driver. They have been successful exporting from InDesign and PDF to XPS, but the

  • JAAS and J2EE SDK -- please help!

    Hi, I'd like to know if it is possible to use customized LoginModule classes in the J2EE SDK reference impl. 1.3 If so what I can't understand is the following: if I use the form-based auth. mechanism in my web app. how can I specify which login modu

  • Customer specific  Cumulation types

    Is there  any  way to create a customer specific Cumulation type apart from using the u2018/u2019 wagetypes? Regards Sony

  • Error using a tag query

    We have a tag query that works in our sandbox environment, but not in dev.  I loaded the same JDBC drivers on both systems. The project was exported from the sandbox, and imported into dev. I have verified the Data Server set up is identical in both

  • I need help guys... please help....

    guys, is someone interested to help here? this is for our thesis.. this is an opengl program. i can send the whole program if you want.. but this is the most urgent and need the best help... ill be glad if you guys can help...... * Dice.java * Create