Function in the select

Hi
can someone please show me how to call a function from a select* statement.
Thanks
Helena

select age
from show_details
where age=func_test();
Here the function returns some value that function definition is like
CREATE OR REPLACE FUNCTION func_test RETURN NUMBER
AS
lv_a NUMBER;
BEGIN
lv_a := 0;
lv_a := lv_a + 1;
RETURN lv_a;
dbms_output.put_line(lv_a);
EXCEPTION
WHEN OTHERS THEN
dbms_output.put_line('Error is '||SQLERRM);
END;
This is to manually call a function
DECLARE
v_a NUMBER;
BEGIN
v_a := func_test();
dbms_output.PUT_LINE(v_a);
END;
************The o/p is '1'.
If the show_details table contains the age value as 1 then the field will be selected by calling the function.

Similar Messages

  • Can call a function in the select statement?

    Is there any ways to call a function in the select statement?
    what I like to do is this:
    select deptno, totalEmployees(deptno), TotalSalary(deptno)
    from emp;
    I know it can be done by count(*) and join tables, but my case
    is much more complex and the where clauses are different from
    one function to another, and have many tables to join and many
    combinations
    Thanks

    Functions can be used in a select statement subject to certain
    restrictions, see
    http://otn.oracle.com/docs/products/oracle8i/doc_library/817_doc/
    server.817/a85397/statem9b.htm#2062024
    It's under "CREATE FUNCTION> Keywords and Parameters> function>
    Restrictions on User-Defined Functions"
    Here is an except...
    When a function is called from within a query or DML statement,
    the function cannot:
    a) Have OUT or IN OUT parameters
    b) Commit or roll back the current transaction, create or roll
    back to a savepoint, or alter the session or the system. DDL
    statements implicitly commit the current transaction, so a user-
    defined function cannot execute any DDL statements.
    c) Write to the database, if the function is being called from a
    SELECT statement. However, a function called from a subquery in
    a DML statement can write to the database.
    d) Write to the same table that is being modified by the
    statement from which the function is called, if the function is
    called from a DML statement.
    Except for the restriction on OUT and IN OUT parameters, Oracle
    enforces these restrictions not only for the function called
    directly from the SQL statement, but also for any functions that
    function calls, and on any functions called from the SQL
    statements executed by that function or any function it calls.

  • Calling a function in the select part of a query

    I am integrating Apex with E-Bus Suite 11.5.10.2.
    I have a function in a sql query. The function calls an apps view. When i run the sql query in TOAD, I get the correct data. When I run it in Apex, i get an error - it says "Invalid number"
    My apex report is registered in my 11i menu. Who is the user that is running this report? Is it apps?
    thanks

    When you run it in TOAD, you are passing through a value, correct? Maybe when your EBS call to your APEX report is done, it is passing through a character value as apposed to a number. You might want to convert your passed in value in your function to a number to be sure..
    Also, it is not always the best idea to call a function in a select statement.. Is there a reason you can't do in sql what your function is doing?
    Thank you,
    Tony Miller
    Webster, TX

  • Getting NULL with function in the select Query

    Hi all,
    SELECT
    ,a.TRANSACTIONAL_CURR_CODE     
    --,gl.CONVERSION_RATE
    ,get_rate(a.transactional_curr_code,NVL(gsob.attribute1,gsob.currency_code),a.conversion_type_code,TRUNC(a.ordered_date)) CONVERSION_RATE
    FROM               
    oe_order_headers_all a,               
    oe_order_lines_all b,                 
    gl_sets_of_books gsob
    --gl_daily_rates gl
    WHERE 1=1
    and a.header_id         = b.header_id
    --and  from_currency = 'USD' --a.transactional_curr_code
    --and conversion_type = 'Corporate' --a.CONVERSION_TYPE_CODE
    --and conversion_date = '23-APR-12' --a.ORDERED_DATE
    and a.header_id =1234;
    With commented above Line
    0.749400479616307
    NULL                                        ---->Why i am getting NULL , i have a Value (0.07809)
    18.521
    Without comment above Code(Hardcoded Code or Commented Line)
    18.521
    0.749400479616307
    0.07809
    select transactional_curr_code,ORDERED_DATE from oe_order_headers_all
    where header_id=1234
    o/p:-
    USD      '23-APR-12'
    select CONVERSION_RATE from gl_daily_rates
    where from_currency = 'USD' --transactional_curr_code
    and conversion_type = 'Corporate' --CONVERSION_TYPE_CODE
    and conversion_date = '23-APR-12' --ORDERED_DATE
    --and to_currency = 'USD'
    CONVERSION_RATE
    18.521
    0.749400479616307
    0.07809
    select gsob.attribute1,gsob.currency_code from gl_sets_of_books
    where SET_OF_BOOKS_ID=1
    gsob.attribute1  gsob.currency_code
    USD                   USD

    Hi ,
    Same as below code in the Function
    select CONVERSION_RATE from gl_daily_rates
    where from_currency = 'USD' --transactional_curr_code
    and conversion_type = 'Corporate' --CONVERSION_TYPE_CODE
    and conversion_date = '23-APR-12' --ORDERED_DATE
    and to_currency = 'USD'

  • Calling a function in the select clause.

    I am using Oracle 11g.
    I am trying to write a query like this
    select name,age, sal, avg = avg_salary(age)
    from customer
    where sal >= avg;
    However, I am not able to do so. What the query is trying to do is print the name, age and salary of every customer as well as the average salary for the customer's age where the customer's salary is greater than the average salary for his age.
    Please help. Thanks.

    Hi,
    The way to assign a column alias is to put the alais after the expression. It makes your code clearer if you put the keyword AS after the expression and before the alias, but this is not required.
    SELECT     name
    ,     age
    ,     sal
    ,     avg_salary (age)     AS avg_salary_age
    FROM     customer
    WHERE     sal     >= avg_salary (age)
    ;You can't reference a column alais in the same query where it is defined (except in an ORDER BY clause). If you want to reference the alias anywhere else (e.g., in the WHERE clause) you have to define it in a sub-query; then you can use it anywhere you want in the super-query, liek this:
    WITH     got_avg_salary_age     AS
         SELECT     name
         ,     age
         ,     sal
         ,     avg_salary (age)     AS avg_salary_age
         FROM     customer
    SELECT     *
    FROM     got_avg_salary_age
    WHERE     sal     >= avg_salary_age
    ;Since AVG is the name of a built-in function, there could be problems using it as a column alias. You could call it average, if you don't like avg_salary_age.

  • Tuning with functions in the SQL Query

    Hi there,
    I am trying to tune a query that has functions in the select section. Wondering how to see the results of the explain plan with these functions included. Is there a qs to include them when running the explain plan
    Thanks
    Hilton
    Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
    PL/SQL Release 11.2.0.3.0 - Production
    "CORE 11.2.0.3.0 Production"
    TNS for Linux: Version 11.2.0.3.0 - Production
    NLSRTL Version 11.2.0.3.0 - Production

    Not really. A function comprises SQL and PL/SQL. PL/SQL cannot possibly be included in an explain plan. Yet, you may take any SQL statement in a function and get its explain plan.
    As a hint, it is generally not good to include functions in the where clause of a query unless that query has some other filter condition that does a drastic filtering of the results. Running a function for tens of thousands of records may be a killer. In that case, it may be better to use joins and/or exists subquerries in you SQL rather than a function that opens a cursor.

  • How to hide the selection screen of a Logical datebase?

    Dear All,
    I used the logical database PNP in one of my program by maintain the attribute 'Logical Database' of this program.
    Now I want to hide all the selection screen of this PNP during the ABAP runtime environment.
    Who can tell me how I can realize it?
    Thank you!
    Regards,
    Brian Liu

    Hi,
    If you call the logical database using a function module, the selection
    screen is not displayed.
    To call a logical database from another program, use the function module LDB_PROCESS.
    <b>Example code:</b>
    TABLES SPFLI.
    SELECT-OPTIONS S_CARR FOR SPFLI-CARRID.
    TYPE-POOLS: RSDS, RSFS.
    DATA: CALLBACK TYPE TABLE OF LDBCB,
    CALLBACK_WA LIKE LINE OF CALLBACK.
    DATA: SELTAB TYPE TABLE OF RSPARAMS,
    SELTAB_WA LIKE LINE OF SELTAB.
    DATA: TEXPR TYPE RSDS_TEXPR,
    FSEL TYPE RSFS_FIELDS.
    CALLBACK_WA-LDBNODE = 'SPFLI'.
    CALLBACK_WA-GET = 'X'.
    CALLBACK_WA-GET_LATE = 'X'.
    CALLBACK_WA-CB_PROG = SY-REPID.
    CALLBACK_WA-CB_FORM = 'CALLBACK_SPFLI'.
    APPEND CALLBACK_WA TO CALLBACK.
    CLEAR CALLBACK_WA.
    CALLBACK_WA-LDBNODE = 'SFLIGHT'.
    CALLBACK_WA-GET = 'X'.
    CALLBACK_WA-CB_PROG = SY-REPID.
    CALLBACK_WA-CB_FORM = 'CALLBACK_SFLIGHT'.
    APPEND CALLBACK_WA TO CALLBACK.
    SELTAB_WA-KIND = 'S'.
    SELTAB_WA-SELNAME = 'CARRID'.
    LOOP AT S_CARR.
    MOVE-CORRESPONDING S_CARR TO SELTAB_WA.
    APPEND SELTAB_WA TO SELTAB.
    ENDLOOP.
    CALL FUNCTION 'LDB_PROCESS'
    EXPORTING
    LDBNAME = 'F1S'
    VARIANT = ' '
    EXPRESSIONS = TEXPR
    FIELD_SELECTION = FSEL
    TABLES
    CALLBACK = CALLBACK
    SELECTIONS = SELTAB
    EXCEPTIONS
    LDB_NOT_REENTRANT = 1
    LDB_INCORRECT = 2
    LDB_ALREADY_RUNNING = 3
    LDB_ERROR = 4
    LDB_SELECTIONS_ERROR = 5
    LDB_SELECTIONS_NOT_ACCEPTED = 6
    VARIANT_NOT_EXISTENT = 7
    VARIANT_OBSOLETE = 8
    VARIANT_ERROR = 9
    FREE_SELECTIONS_ERROR = 10
    CALLBACK_NO_EVENT = 11
    CALLBACK_NODE_DUPLICATE = 12
    OTHERS = 13.
    IF SY-SUBRC <> 0.
    WRITE: 'Exception with SY-SUBRC', SY-SUBRC.
    ENDIF.
    FORM CALLBACK_SPFLI USING NAME TYPE LDBN-LDBNODE
    WA TYPE SPFLI
    EVT TYPE C
    CHECK TYPE C.
    CASE EVT.
    WHEN 'G'.
    WRITE: / WA-CARRID, WA-CONNID, WA-CITYFROM, WA-CITYTO.
    ULINE.
    WHEN 'L'.
    ULINE.
    ENDCASE.
    ENDFORM.
    FORM CALLBACK_SFLIGHT USING NAME TYPE LDBN-LDBNODE
    WA TYPE SFLIGHT
    EVT TYPE C
    CHECK TYPE C.
    WRITE: / WA-FLDATE, WA-SEATSOCC, WA-SEATSMAX.
    ENDFORM.
    Regards,
    Sumit.
    Message was edited by: sumit kumar
    Message was edited by: sumit kumar

  • Decode in the select Statement

    Hi All,
    I am using the decode function in the select statement....but as i am using the group by in the select statement....i am not able to run the same query
    How to tackle this problem of handling the decode ....while we have group by also.
    This is bit urgent
    Thanks for your help
    Ramya

    Hi,
    Thanks for the quick reply.
    Here is the code...i have included the decode for the customer carrier code...
    SELECT c.trx_number invoice_number,
    c.trx_date invoice_date,
    ctl.sales_order_date order_date,
    c.ship_date_actual ship_date,
    c.purchase_order,
    ctl.sales_order order_number,
    olv.ordered_item item,
    msi.description item_description,
    olv.ordered_quantity quantity,
    olv.unit_selling_price unit_price,
    olv.unit_selling_price * olv.ordered_quantity amount,
    olv.tax_value,
    rc.customer_number,
    csta.customer_carrier_code,
    (SELECT decode(customer_carrier_code, NULL, 'Shipping & Handling', 'Shipping') sh
    FROM xx_cust_ship_to_addresses_v cstaa,
    ra_addresses ara
    WHERE cstaa.location_id = ad.location_id
    AND ara.location_id = ad.location_id) SH,
    rc.customer_name invoice_to_name,
    rct.name invoice_type,
    olv.sold_to,
    olv.ship_to_location,
    olv.ship_to_address1,
    olv.ship_to_address2,
    SUBSTR(olv.ship_to_address5, LENGTH(olv.ship_to_address5) -2, LENGTH(olv.ship_to_address5)) ship_to_country,
    SUBSTR(olv.ship_to_address5, LENGTH(olv.ship_to_address5) -9, 6) ship_to_postalcode,
    SUBSTR(olv.ship_to_address5, LENGTH(olv.ship_to_address5) -12, 2) ship_to_state,
    SUBSTR(olv.ship_to_address5, 1, LENGTH(olv.ship_to_address5) -15) ship_to_city,
    olv.invoice_to_address1,
    olv.invoice_to_address2,
    SUBSTR(olv.invoice_to_address5, LENGTH(olv.invoice_to_address5) -2, LENGTH(olv.invoice_to_address5)) invoice_to_country,
    SUBSTR(olv.invoice_to_address5, LENGTH(olv.invoice_to_address5) -9, 6) invoice_to_postalcode,
    SUBSTR(olv.invoice_to_address5, LENGTH(olv.invoice_to_address5) -12, 2) invoice_to_state,
    SUBSTR(olv.invoice_to_address5, 1, LENGTH(olv.invoice_to_address5) -15) invoice_to_city,
    olv.flow_status_code,
    olv.terms net_terms,
    olv.freight_terms_code freight_terms,
    olv.fob_point_code fob
    FROM ra_customer_trx_all c,
    ra_customer_trx_lines_all ctl,
    ra_cust_trx_types rct,
    jtf_rs_salesreps rs,
    ra_customers rc,
    ra_addresses ad,
    ra_site_uses su,
    mtl_system_items msi,
    oe_order_headers_v ohv,
    oe_order_lines_v olv,
    rcv_lot_transactions tl,
    rcv_shipment_lines sl,
    rcv_shipment_headers rsh,
    rcv_transactions rt,
    wsh_delivery_details wdd,
    xx_cust_ship_to_addresses_v csta
    WHERE to_char(ohv.order_number) = ctl.sales_order
    AND ctl.customer_trx_id = c.customer_trx_id
    AND c.cust_trx_type_id = rct.cust_trx_type_id
    AND c.org_id = rs.org_id
    AND c.primary_salesrep_id = rs.salesrep_id
    AND c.ship_to_site_use_id = su.site_use_id
    AND su.address_id = ad.address_id
    AND ad.customer_id = rc.customer_id
    AND ctl.inventory_item_id = msi.inventory_item_id
    AND ohv.header_id = olv.header_id
    AND olv.line_id = wdd.source_line_id(+)
    AND to_char(olv.line_id) = ctl.interface_line_attribute6
    AND tl.shipment_line_id = sl.shipment_line_id
    AND sl.shipment_header_id = rsh.shipment_header_id
    AND tl.transaction_id = rt.transaction_id
    AND csta.location_id = ad.location_id;
    GROUP BY c.trx_number,
    csta.customer_carrier_code,
    c.trx_date,
    c.creation_date,
    c.ship_date_actual,
    c.sold_to_customer_id,
    c.bill_to_customer_id,
    c.bill_to_site_use_id,
    c.ship_to_customer_id,
    c.ship_to_site_use_id,
    c.purchase_order,
    (SELECT decode(customer_carrier_code, NULL, 'Shipping & Handling', 'Shipping') sh
    FROM xx_cust_ship_to_addresses_v cstaa,
    ra_addresses ara
    WHERE cstaa.location_id = ara.location_id
    AND ara.location_id = ad.location_id),
    ctl.sales_order,
    ctl.sales_order_date,
    ctl.tax_rate,
    ctl.customer_trx_id,
    ctl.taxable_amount,
    rc.customer_number,
    olv.ordered_item,
    olv.unit_selling_price,
    olv.unit_list_price,
    olv.tax_value,
    olv.unit_cost,
    olv.ordered_quantity,
    rs.name,
    rc.customer_name,
    rc.customer_id,
    rc.party_id,
    rc.party_number,
    ad.address_id,
    rct.name,
    msi.description,
    olv.unit_selling_price * olv.ordered_quantity,
    c.org_id,
    ohv.header_id,
    olv.sold_to,
    olv.ship_from,
    olv.ship_to_location,
    olv.ship_to_address1,
    olv.ship_to_address2,
    SUBSTR(olv.ship_to_address5, LENGTH(olv.ship_to_address5) -2, LENGTH(olv.ship_to_address5)),
    SUBSTR(olv.ship_to_address5, LENGTH(olv.ship_to_address5) -9, 6),
    SUBSTR(olv.ship_to_address5, LENGTH(olv.ship_to_address5) -12, 2),
    SUBSTR(olv.ship_to_address5, 1, LENGTH(olv.ship_to_address5) -15),
    olv.invoice_to_location,
    olv.invoice_to_address1,
    olv.invoice_to_address2,
    SUBSTR(olv.invoice_to_address5, LENGTH(olv.invoice_to_address5) -2, LENGTH(olv.invoice_to_address5)),
    SUBSTR(olv.invoice_to_address5, LENGTH(olv.invoice_to_address5) -9, 6),
    SUBSTR(olv.invoice_to_address5, LENGTH(olv.invoice_to_address5) -12, 2),
    SUBSTR(olv.invoice_to_address5, 1, LENGTH(olv.invoice_to_address5) -15),
    olv.flow_status_code,
    olv.terms,
    olv.freight_terms_code,
    olv.shipping_method_code,
    olv.fob_point_code,
    olv.line_id,
    rsh.attribute1,
    rsh.attribute2,
    su.tax_code,
    su.ship_via,
    wdd.tracking_number
    ORDER BY invoice_number;

  • Will a explain plan consider a function in a select statement.

    Hi gurus,
    I have a question regarding explain plan.
    I ran a query, which returns me explain plan with multiple CPU costs around 300K.
    now i use a function, and the number of lines displayed in explain plan reduces from 12 to 8 lines.
    What i dont understand is.. Is the explain plan considering the function in the select statement ?
    ex.
    explain plan for
    select column1,
             column2,
             function(value1)
    from case
    where case_no = 1will a explain plan consider the functions in a select statement ?
    Thank you.

    What i dont understand is.. Is the explain plan considering the function in the select statement ?Maybe there are tweaks which reveal more information from the explain plan, but a straightforward way won't necessarily expose any function call:
    SQL> create or replace function get_dname (i_deptno integer)
       return varchar2
    as
       l_dname   dept.dname%type;
    begin
       select   dname
         into   l_dname
         from   dept
        where   deptno = i_deptno;
       return l_dname;
    end get_dname;
    Function created.
    SQL> explain plan
       for
          select   ename, deptno, get_dname (deptno) dname
            from   emp
           where   deptno = 10
    Explain complete.
    SQL> select   * from table (dbms_xplan.display ())
    PLAN_TABLE_OUTPUT                                                                                                                                    
    Plan hash value: 3956160932                                                                                                                          
    | Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |                                                                           
    |   0 | SELECT STATEMENT  |      |     5 |    45 |     3   (0)| 00:00:01 |                                                                           
    |*  1 |  TABLE ACCESS FULL| EMP  |     5 |    45 |     3   (0)| 00:00:01 |                                                                           
    Predicate Information (identified by operation id):                                                                                                  
       1 - filter("DEPTNO"=10)                                                                                                                           
    13 rows selected.
    SQL> truncate table plan_table
    Table truncated.
    SQL> explain plan
       for
          select   ename, deptno
            from   emp
           where   deptno = 10
    Explain complete.
    SQL> select   * from table (dbms_xplan.display ())
    PLAN_TABLE_OUTPUT                                                                                                                                    
    Plan hash value: 3956160932                                                                                                                          
    | Id  | Operation         | Name | Rows  | Bytes | Cost (%CPU)| Time     |                                                                           
    |   0 | SELECT STATEMENT  |      |     5 |    45 |     3   (0)| 00:00:01 |                                                                           
    |*  1 |  TABLE ACCESS FULL| EMP  |     5 |    45 |     3   (0)| 00:00:01 |                                                                           
    Predicate Information (identified by operation id):                                                                                                  
       1 - filter("DEPTNO"=10)                                                                                                                           
    13 rows selected.

  • Call function after AutoSuggest select

    Hello,
    Looking at the
    Auto-suggest
    Overview I'm wondering if any clever folks out there can tell
    me the best way to call a function after a user has selected an
    item from the list (preferably by either mouse or keyboard). The
    function takes the selected value as an argument.
    On a related note does anyone think that
    Spry.Widget.AutoSuggest would benefit from a finish option like the
    apry effects have?
    Cheers,
    Peter

    Hi Cristian,
    Thanks for your reply.
    Firstly, I forgot to say in my previous post how great I
    think Spry is, I've played with some other frameworks in the past
    but Spry is the one that has really clicked with me.
    The future developments look very interesting, I'll be
    keeping my eye on Spry.
    As for the what I mean by the finish: callback function, it
    occurs to me that many people may want to have spry do 'x' after
    the user has selected something from the AutoSuggest list. In my
    case I want to filter a recordset based on what the user has just
    selected, this can be done easily by having them click a button
    that calls a function after they have made their selection but
    having the option of this happening 'automatically' would be a real
    boon.
    I don't really know anything about advanced JS so I don't
    know if something like this would be possible. E.g.:
    var ac6 = new Spry.Widget.AutoSuggest("productSampleDiv",
    "productMenuDiv", "dsProducts3", 'name', {containsString: true,
    minCharsType: 2, finish: function x() });

  • How to get the value from a function using a select statement

    I have a function(user defined not built in) that returns multiple values(like an array). My question is how do i get those values in a select statement. when i tried to retrieve it,
    select pack.my_members from dual;
    i am getting an error
    ORA-00902: invalid datatype
    I am sure this must be a syntax error with the select statement
    The following is the function that give the array of data
    package pack
    package spec
    Type my_table is table of varchar2(25);
    function the_members
    return pack.my_table;
    pakcage body
    function the_members return pack.my_table
    Remarks: This function returns a table containing names of the
    members
    is
    tm pack.my_table:= pack.my_table('first member','second member','third member','fourth member');
    begin
    return tm;
    end the_members;

    Check this example on Pipelinedfunction

  • Oracle 11g SUM function on the result of inner Select

    The inner Select returns rows with the values. The outer select running on tthe result of inner select SUM the result of the inner select.
    Although there are valid rows of the inner select the SUM in the outer SELECT return NVL. As a comment any aggregate function on the outer select returns NVL.
    The query is below.
    select a.yil,
    a.ay,
    sum(brut_prim),
    sum(kom),
    from (SELECT oid_pol_kesilen_acente,
    to_char(pp.zeyil_tanzim_tar, 'yyyy') yil,
    to_char(pp.zeyil_tanzim_tar, 'mm') ay,
    sum(decode(substr(pp.no, 1, 1),
    'T',
    pp.zeyil_brut_prim_fark / 2,
    pp.zeyil_brut_prim_fark)) -
    sum(pp.zeyil_gv_fark) brut_prim,
    sum(pp.zeyil_acente_kom_fark) kom
    from pol_police pp, org_acente oa
    WHERE SUBSTR(PP.NO, 1, 1) != 'D')
    group by oid_pol_kesilen_acente,
    to_char(pp.zeyil_tanzim_tar, 'yyyy'),
    to_char(pp.zeyil_tanzim_tar, 'mm')) a
    group by a.yil, a.ay, oid_pol_kesilen_acente
    Edited by: [email protected] on May 7, 2010 2:09 AM
    Edited by: [email protected] on May 7, 2010 2:31 AM

    Hi,
    please try the below sql:
    select a.yil, a.ay, sum(brut_prim), sum(kom),
    from (SELECT oid_pol_kesilen_acente,to_char(pp.zeyil_tanzim_tar, 'yyyy') yil, to_char(pp.zeyil_tanzim_tar, 'mm') ay,
    sum(decode(substr(pp.no, 1, 1), 'T',nvl(pp.zeyil_brut_prim_fark,0) / 2,nvl(pp.zeyil_brut_prim_fark,0))) - sum(nvl(pp.zeyil_gv_fark,0)) brut_prim,
    sum(nvl(pp.zeyil_acente_kom_fark,0)) kom
    from pol_police pp, org_acente oa
    WHERE SUBSTR(PP.NO, 1, 1) != 'D'
    group by oid_pol_kesilen_acente,
    to_char(pp.zeyil_tanzim_tar, 'yyyy'),
    to_char(pp.zeyil_tanzim_tar, 'mm')
    ) a
    group by a.yil, a.ay, oid_pol_kesilen_acente ;
    Thanks,
    Siva

  • Functional area(FKBER( field in the selection screen))

    Hi,
       I have a requirement to add functional area field in the selection screen for a report painter report. This report using library 1VK and table 'CCSS'. I added functional area field in the general data selection . After the execution of report with functional area field filled with value. report not giving any output. do i need to maintain any setting to achieve?
    Regards,
    Palani

    Hi,
    How you have filled the values?
    It is 16 CHAR long.

  • Functional area(FKBER field in the selection screen of the report painter))

    Hi,
    I have a requirement to add functional area field in the selection screen for a report painter report. This report using library 1VK and table 'CCSS'. I added functional area field in the general data selection . After the execution of report with functional area field filled with value. report not giving any output. do i need to maintain any setting to achieve?
    Regards,
    Palani

    1. Call GR22 and click "Characteristics".
    2. Check FKBER and assign a position number to it.
    3. Save and close the library.
    4. Call your report in GRR2 and you should now see FKBER as an available characteristic.
    5. Use it in the General Data Selection or as a Lead Column, as per requirement.
    Or,
    1. Call GR21 and create a custom library. Provide a name and description and also provide a library you can copy from (scan for the best-fit library).
    2. Now follow the steps 2 through 5 above to achieve your result.
    Hope this helps.
    Cheers.

  • Delaying a function so ADF will get all the selected rows and run only 1 time ?

    Hello,
    I'm using JDeveloper 12.1.2.0.0.
    I have a group of functions that are executed after i click on one or more rows, which is called:
    public void onDimProjectSelect(SelectionEvent selectionEvent)
    Whenever i shift-click some rows (lets say, for the purpose of this example, that i shift-click the 1st row to the 5th row, so i shift select and i get selected the rows: 1,2,3,4 and 5).
    I did notice that what happens is that the function onDimProjectSelect will execute with the 1st row, and after it runs all the functions, it will run again the function onDimProjectSelect with the 1, 2, 3, 4 and 5 rows as it should in the first place.
    Why is this happening? I've tried to add a delay but i did not work.
    This is really a pain because its spending time executing a function without all of the rows that is suppose to have, so it will run again.
    I think the problem here is how ADF does the selections for the function but i don't know how to change it.
    Any ideia of why is this happening? What can i do to correct this?
    Regards,
    Frederico.

    Hey Frank,
    I mean that my function onDimProjectSelect has other functions inside that need to be executed so when i say that is runs all the functions i mean the functions that are suppose to execute when onDimProjectSelect is executed.
    Maybe the problem is my implementation approach but it was required to use the selection. But the funny part is that i select with the shift-click and he knows that, since it will run the function with all the rows that are selected but firstly he will execute the function with just the first selected row.

Maybe you are looking for

  • Please help me with my survey...

    I am doing this survy for my professor- I am at Bethedsa community college. (Currently, our JVM runs about 400% faster than commercial JVM, so this is definitely in research stage. ) I will appreciate your response- I need to get 20-30 responses- bef

  • BOM explosion in subcontracting PR

    Hi... I have one issue of BOM explosion in subcontracting PR. I have created BOM, routing & PV. Production version maintained in info record. While creating manaul subcontracting PR , BOM is not exploded giving error message as "Not possible to deter

  • How many IDE drives & CDrom can be installed with SATA drives??

    How many IDE drives & CDrom can be installed with SATA drives?? i have 2 IDE hard disks & 2 CDROM drives: can install SATA hard disk added to these drives or do i have to remove some??? & if it can be added, can i install 2 SATA drives??? THX in adva

  • Setting the smpt port out wil .mac mail

    Maybe I'm not getting this, but I want to set the send mail port on my iPhone that is using my .mac account. I looked at the instructions for doing this and go to Setting -> Mail, but I cannot find where to put in the smtp.mac.com:258 or whatever por

  • Write data using utl_file

    hi , i am using oracle 10g. i am writing this job which runs every day and writes into file. first time i has to put upto 700,000 records into file and from next run it will be around 5000. please let me know what ever i am doing is correct or not. i