Action dynamic pl/sql function setvalue

Hello

I have a table of currency with Exchange rate column.
I've created a form that allow the user to select the currency of the table and enter the rate elements of page Px_RATE.
I want to implement using dynamic action in the apex 4
Please help me on this case

Thanks and greetings

Hello

You can do this by defining a dynamic action as follows...

#1-do a right click on the item page to select the currency (let's call it P1_CURRENCY for this example) and select 'create the dynamic Action '.

#2-Select 'Advanced' that we use the type of dynamic action "set the value, which is not available in the 'Standard' of the Assistant branch.

#3-name your dynamic action, say "RATE of GETTING", click on "next".

#4-let the "When" default attributes, it simply defines that the dynamic action is triggered whenever the currency item, click 'next '.

#5-pour the "real Action > Action' select 'Put the value'"

#6-think if you want to set the value on the loading of the page of the dynamic action too, if so let the 'Fire when loading the Page' box checked.

#7 [assuming that you have a simple API of PL/SQL that returns the rate of say get_rate, for example] select 'Set Type' of the 'body of the PL/SQL function.

#8-pour "Body of the PL/SQL function" says something like:

return get_rate(:P1_CURRENCY);

#9 "Page to submit elements", specify the element to P1_CURRENCY currency, and then click "next".

#10-pour "items affected" specify "Item" and then select the page element where you want to return the value of the rate, say P1_RATE.

#11-click on 'create '.

Let me know if it works for you or if you have other questions.

Kind regards
Anthony.

Tags: Database

Similar Questions

  • Use Dynamic Actions with pl/sql, calling a javascript alert function

    Hello

    I use Apex 4.0.1.00.03 with IE7.

    The problem I have is:

    I am converting an Oracle Forms application that has a lot of logic in it. In the application forms, it is a pl/sql function, based on a If/else condition call a popup alert box, which displays a warning message. He called pl/sql functions that return raising to the IF statement.

    Example of pl/sql code:

    If check_records() > 0 Then
    message to the alert box
    ElsIf TypeA_record then
    message to the alert box
    On the other
    message to the alert box
    End If;

    I need to replicate this functionality to the Apex 4. I tried to create dynamic Action on a page element, using a pl/sql function, however, when I call the popup javascript, this code not popup an alert box. I need the pl/sql to be run when the element of the page changes, not when the page is sent.

    The code I used to test the pl/sql code, which does not work in dynamic Actions > pl/sql is:

    Begin
    HTP.p ("< script type =" text/javascript"> '");
    HTP.p ("alert ("today runs javascript code!");"
    );
    HTP.p ("< /script >");
    End;

    I need to create a pl/sql function that can do alert areas based on an IF condition.

    Could someone point me in the right direction? Using dynamic shares the best way forward? I need to trigger on a page element, change the value.

    Works fine now.
    In the javascript code, I changed:

    get.addParam ('x 01', $v ('P105_PREP_TYPE'));

    by

    get.addParam ('x 01', $v ('P1_PREP_TYPE'));

    P1_PREP_TYPE is the correct name of the element.
    Now when I choose the OTHER, 1 message.

    Concerning

  • Setting of an element by using a dynamic action of PL/SQL does not?

    Hello

    I have what is probably the problem of the beginner...

    1 - an element with the default 'http://google.com '.
    2. on a button, I have a dynamic action that defines an element
    3. first action of PL/SQL (: p1_cmd: = "http://www.oracle.com"; with elements of the Page return = P1_CMD)
    4. second action alert displays this text 'P1_CMD = & P1_CMD'.

    I expected P1_CMD to be "http://oracle.com" in step 4 but is still "http://google.com" even if he showed... oracle...

    How much I miss or do not understand?

    Thanks for helping a newbie

    PS while my example seems simple, the goal is to construct a URL (using items entered by the user and a DB function call), and then open it in a pop-up window. Everything works except that the constructed URL is still a virgin when you call the popup

    Hi yv *,.

    using the syntax & MY_ITEM., the value is populated only on page rendering. In your case, value is populated probably okay, but you get it in the wrong sense.
    Try to use JS API (http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21676/javascript_api.htm#CDEEIGFH), for example $v ('P1_CMD').

    BR,
    Marko Goricki

  • Access to the element in a dynamic PL/SQL trigger Action?

    Hello

    I have a form that is used to calculate the volume of a (large) number of tanks based on the heights of tank is entered.

    I have a PL/SQL procedure that performs the calculation: it receives the name of the tank and the height and calculates the volume (each tank may have different physical characteristics).

    I didn't create a dynamic Action by tank (I'm lazy and the number of tanks is important!). I currently have a dynamic Action that is triggered whenever one of the heights of the tank on the form changes. The PL/SQL action called the calculation for each tank. FOR EXAMPLE

    :P1_TANK1_VOL := tank.vol('TANK1', :P1_TANK1_HEIGHT);
    :P1_TANK2_VOL := tank.vol('TANK2', :P1_TANK2_HEIGHT);
    ...
    :P1_TANK50_VOL := tank.vol('TANK50', :P1_TANK50_HEIGHT);
    
    

    This works, but is to perform calculations of 50 whenever one is necessary, and can seem slow.

    Is there a way to identify the trigger for the action of PL/SQL? FOR EXAMPLE

    IF TriggeringElement = 'P1_TANK1_HEIGHT' THEN
    :P1_TANK1_VOL := tank.vol('TANK1',:P1_TANK1_HEIGHT);
    END IF;
    
    

    Any ideas?

    No PL/SQL directly. You could do a JavaScript action before your PL/SQL and write the id (which is the name of the element in the APEX), the item trigger in a hidden item, submit it to your PL/SQL action and now you know how it started.

    Kind regards

    Joni

  • Dynamic Action run PL/SQL Code runs is not after 4.2.5 upgrade

    APEX 4.2.4 to 4.2.5 11.2 database upgrade

    I have a button to click on DA who owns shares run of PL/SQL Code and update point who worked in version 4.2.4 which is no longer running after the 4.2.5 patch.

    The PL/SQL procedure has been tested autonomous and it runs correctly.

    I tested him DA is actually shot on the click event by adding an alert "DA xxxx pulled" action before the execution of work of PL/SQL action and action alert.

    There is also a similar on DA click which makes the action opposite to the DA problem and it works both are configured in the same way:

    Static DA, run Code PL/SQL - check waiting for result, and not repress with the same Submit and return items.

    Any ideas on a possible cause/solution much appreciated

    Fixed it, the question was the Page elements of return of goods on the action of PL/SQL Code:

    If the target element was empty the action failed, by adding a value in the database through a normal SQL insert then the insert DA completed successfully.

    Removing Page elements at the point of return of the action of PL/SQL and together action update the target element after the DA fires in all scenarios.

    But thanks for the lead

  • Analyze: Body of PL/SQL function returning a SQL query

    I need to get the final SQL returned by the PL/SQL function.
    I'll use this final SQL in a procedure.
    Please provide only a few tips on how to get the SQL code. I already looked in the DBMS_SQL package, but I don't know if this is the right place to look.


    Kind regards
    Sumit
    declare 
    
      l2 varchar2(2000);
    
    begin
    
      l2:= 'Select NAME,ORIGINATED,OWNER,ORIGINATOR,';
      l2:= l2 || 'DESIGNATED_UNIT,SOURCE,';
      l2:= l2 || 'REFERENCE';
      l2:= l2 || ' from MV_DETAILED_DATA';
    
      /*
        Copy dynamic query SQL to application item for later use.
      */
      :app_item := l2;
    
      wwv_flow.debug('l2: ' || l2);
    
      return l2;
    
    end;
    

    I always use a call of debugging in the region of body of the PL/SQL function returning a SQL query sources so the real generated SQL can be quickly entered via the debug mode.

  • Calling a SQL function to send all page

    In an APEX application, is it possible to call a SQL function so that the application be submitted instead of 'action SQL INSERT'. This function takes 2 parameters user entering the page of the application.

    Send page has essentially two text fields and a "submit" button
    Version and Patch Info

    The SQl function has 2 parameters like this, start_new_env (oracleversion IN VARCHAR2, opatchinfo IN CLOB)

    Any help will be much appreciated.

    Thank you

    Published by: Rajesh on November 17, 2009 08:49

    Please mark it as answered and mark it as correct...
    Thank you

  • APEX shortcuts using the source of the body of the PL/SQL function

    Hi all

    Recently, I came across the feature of "Shortcuts" in the "Shared components" section of the APEX and thought great, somewhere to set the common/standard items once, then use these several times in different pages of my application.

    This seemed to work correctly when you use the 'Source' of "HTML Text" or "HTML text with special characters escaped", but then I wanted to explore the use of the "Body of the PL/SQL function" option to create a more dynamic shortcut/variable on the base.

    This is where I came across a particular problem in the APEX (Version 3.2.1.00.10 on GR 11, 2 on Oracle Enterprise Linux). When I set my shortcut, and then perform a reference to my shortcut (using "MY_SHORTCUT") in an area of a page, the value of shortcut is back, but is added with the reference variable (ie. the 'MY_SHORTCUT' chain).

    For simplicity, my example looks like this (of course, my real world example is a bit more complicated, but this example produces the same error):
    (a) I define my shortcut called "MY_SHORTCUT" and using the body of the PL/SQL function under "Source Type", define my procedure as "htp.p(:USER)."
    (b) I then create a new page (basic HTML page), and a new region of the 'type'-> 'HTML Text (with shortcuts).
    (c) in the "Source region", I define my shortcut like - "MY_SHORTCUT".
    (d) I apply changes and then run the page.

    I'll be back will be name of the current user with "MY_SHORTCUT" appended/added immediately after the user name - for example. the string:-' BRAD «MY_SHORTCUT»»

    Question is - how to stop the shortcut/reference text "MY_SHORTCUT" to be added to the variable you want to see the and thereafter on your page? I am just wanting the variable, NOT the reference for the shortcut.  I do something wrong using the HTP package, and if yes, what should I use?

    If "MY_SHORTCUT" is defined as "HTML text with special characters escaped" (where I can refer to elements of application using the syntax '& USER.') so that everything works correctly. My reason for using the PL/SQL is to generate a more dynamic output variable, based on elements of application throughout the entire application - and of course the use of shortcuts to minimize coding and duplication.


    Thanks in advance,
    Brad

    Hello

    The body of the PL/SQL function must RETURN a value.

    Try:

    RETURN :APP_USER;
    

    Andy

  • PL/SQL functions as LOV to use in another display object

    Hello

    We had a custom search to extract data from a display object and the data displayed as a Table of ADF. Now, there are few requests for searches on this report. Go see criteria and Panel request if we allow saved search. But the fields used in the research are going through a lot of logic and thus the PL/SQL functions are implemented. We used to call these functions and lists separated by commas and then divided the list into individual elements and put in the component "select options".

    The value (String) returned by the pl/sql function is something like - APAC, EMEA, NORTH AMERICA, FDA

    I am creating a LOV based on SQL-query "Select getRegions() from dual;

    Now, I want the list separated by commas to divide so that I could use this LOV in an another view and try the display criteria and saved searches.

    I tried to assign as LOV just to check and the criteria drop-down view for region displays same value as single element - "APAC, EMEA, NORTH AMERICA, LAD."

    I want it to be 4 separate - elements

    APAC

    EMEA

    NORTH AMERICA

    DVL

    Is there anyway to achieve this?

    Or better is at - it another way to do this (maybe I'm wrong)

    Thank you.

    JDev: 11.1.2.4

    Instead of a programmatic VO of PL/SQL, I found sometimes easier to write PL/SQL functions that return a table - need to CREATE a TYPE for the data items to be returned and a TYPE of TABLE IMBRIQUE tabular form of the first kind.  The function returns the type of table, and can even be a PIPElined table function.  Then I create a VO with the following text:

    SELECT * from TABLE (my_function_returning_table)

    The function can even take parameters, which you fill with variable BIND your VO.

  • ORA-06503: PL/SQL: function returned no value ORA-06512:

    Hi all

    SQL > set serveroutput on

    SQL > CREATE OR replace FUNCTION qty_value (p_item_id number)

    2 RETURN NUMBER

    3 EAST

    4 v_qty_arrival NUMBER;

    5 BEGIN

    6. SELECT THE CASE SENSITIVE OPTION

    7. WHAT (SUM (b.quantity) - SUM (b.quantity_received)) < = 0 THEN 0

    8 ELSE (SUM (b.quantity) - SUM (b.quantity_received))

    9 END Qty_Arrival

    10 INTO v_qty_arrival

    Po_lines_all 11 a,

    po_line_locations_all 12 b

    13 WHERE a.po_line_id = b.po_line_id

    14 AND a.item_id = p_item_id;

    15 EXCEPTION

    16 THEN THAN OTHERS THEN

    17 v_qty_arrival: = NULL;

    18 RETURN v_qty_arrival;

    19 END qty_value;

    20.

    The function is created.

    SQL >

    SQL > select xxc_qty_arrivale (214960) double

    2.

    Select xxc_qty_arrivale (214960) double

    *

    ERROR on line 1:

    ORA-06503: PL/SQL: function returned no value

    ORA-06512: at the 'APPS '. XXC_QTY_ARRIVALE', line 19

    Back AFTER using the exception block is fine as long as your code actually REACHED the exception block.

    When there are no errors, then your code will not enter the exception block, but you still NEED to return a value, since it is what functions a function wants to return a value, that's what the functions are made for.

    Spot the differences between the following 3 functions. Understand how they work.

    The first function has only a return in the exception block but runs correctly. Result: error, because the back is missing in the code block.

    The second function has a return in the exception block and one in the block of code and runs correctly. Result: no error, because the return is not missing in the code block.

    The third function has a return in the exception block and one in the block of code and is forced into an error. Result: no error, because the return of the exception handler is used (instead of retriggering of the error, which you would normally do).

    SQL > create or replace function myfunc

    2 return number

    3 as

    4 start

    5 dbms_output.put_line ('in the section of code');

    6 null;

    7 exception

    8 then than others

    9. can

    10 dbms_output.put_line (' in the exception handler ' |) SQLERRM);

    11      --

    12 return 0;

    13      --

    14 end;

    15.

    The function is created.

    SQL > select double myfunc;

    Select double myfunc

    *

    ERROR on line 1:

    ORA-06503: PL/SQL: function returned no value

    ORA-06512: at "GHPLUS. MYFUNC", line 14

    In the section of code

    SQL > create or replace function myfunc

    2 return number

    3 as

    4 start

    5 dbms_output.put_line ('in the section of code');

    6 null;

    7    --

    8 return 1;

    9    --

    10 exceptional

    11 so that others

    12. can

    13 dbms_output.put_line (' in the exception handler ' |) SQLERRM);

    14      --

    15 return 0;

    16      --

    end 17;

    18.

    The function is created.

    SQL > select double myfunc;

    MYFUNC

    ----------

    1

    1 selected line.

    In the section of code

    SQL > create or replace function myfunc

    2 return number

    3 as

    n number 4;

    5. start

    6 dbms_output.put_line ('in the section of code');

    7 n: = 1/0; -force an error (zero divisor) to join the exception handler

    8    --

    9 return 1;

    10-

    exception 11

    12 so that others

    13. can

    14 dbms_output.put_line (' in the exception handler ' |) SQLERRM);

    15      --

    16 return 0;

    17      --

    18 end;

    19.

    The function is created.

    SQL > select double myfunc;

    MYFUNC

    ----------

    0

    1 selected line.

    In the section of code

    In the handler for exception ORA-01476: divisor is equal to zero

    SQL >

  • PL/SQL function to calculate the non-working days

    Hello

    I have the following pl/sql function which generates a number of days between two selected dates (i.e. excluding weekends). However, I also need to exclude specific holidays - day of Christmas etc. These holiday dates are stored in a table in our database (11 GR 2) called "HOLIDAY".

    How can I integrate the holidays which is held in the table of holidays in the following query to exclude these dates as well? I know how to write a separate funtion pl/sql for a number of days between two dates using SELECT... BUT I can't work out how to bring together them in a single query.

    Could someone show me how with the pl/sql / dates below please?

    Example of HOLIDAY table below.

    Thank you!

    TP

    create or replace
    function WORKING_DAYS (pi_start_date in date, pi_end_date in date) return integer
    
    is
    
    v_start_date date :=pi_start_date;
    v_end_date date:=pi_end_date;
    v_count integer:=0;
    
    begin
    
    while v_start_date <= v_end_date
          loop
                            if to_char(v_start_date,'D') not in ('6','7')                    
                            then
                            v_count := v_count+1;                       
                            end if;
                           
                    v_start_date:=v_start_date+1;
                   
          end loop;
         
    return v_count;
    
    end;
    
    

    (select '10-Apr-2013' as NWD from dual union all
    select '06-May-2013' from dual union all
    select '27-May-2013' from dual union all
    select '26-Aug-2013' from dual union all
    select '26-Dec-2013' from dual union all
    select '25-Dec-2013' from dual union all
    select '01-Jan-2014' from dual union all
    select '18-Apr-2014' from dual union all
    select '21-Apr-2014' from dual union all
    select '05-May-2014' from dual union all
    select '26-May-2014' from dual union all
    select '25-Aug-2014' from dual union all
    select '25-Dec-2014' from dual union all
    select '26-Dec-2014' from dual) HOLIDAYS
    

    Hello

    the link is on MOSC, not OTN... Here's a copy:

    This function calculates the number of days between two dates, ignoring weekends and holidays (if requested and if the holidays are stored in a table)

    I give an example of table 'public_holiday' with sample data, but users must ensure that their table contains the relevant data (all holidays within the maximum range of use of the service)

    CREATE TABLE public_holiday (calendar_day, DATE, text VARCHAR2 (30));

    FUNCTION to CREATE or REPLACE nb_days (p_date_from IN DATE

    p_date_to DATE by DEFAULT TRUNC (sysdate)

    , p_public_holidays in CHAR DEFAULT 'Y '.

    ) RETURN NUMBER

    DEFINE AUTHID

    AS

    /*********************************************************************/

    / * Author: Bruno Vroman * /.

    / * Created: 23-AUG-2012 * /.

    / * Last updated: 23-AUG-2012 * /.

    / * Object: to calculate the number of days between 2 dates, to the exclusion of * /.

    / * Saturday and Sunday, but also "holidays" If the * /.

    / * argument 'p_public_holidays' = 'Y ' * /.

    / * Support: p_date_from<= p_date_to                             ="">

    / * component ' hour min dry "ignored (just counting days) * /.

    /* First step:                                                       */

    / * the calendar days between 2 days * /.

    / Remove 2 days for each "week" and 0 or 1 extra day * /.

    / * function to a condition "complex" mix day of first week * /.

    / * and the number of days when full remaining weeks are removed * /.

    / * (set up once for all, for example if there is 3 days and the * /)

    (/ * first day is a Thursday, there is 1 "Sat/Sun" to subtract) * /.

    / * Second step: If 'p_public_holidays' = 'Y': other * /.

    / * days, do not count holidays.                         */

    / Holiday everyday are defined in a table "public_holiday" * /.

    / * Note: there may be holidays defined on Saturday/Sunday.       */

    /*********************************************************************/

    l_result NUMBER;

    l_from DATE;

    l_to DATE;

    l_case tank (4);

    BEGIN

    l_from: = TRUNC (p_date_from);

    l_to: = TRUNC (p_date_to);

    l_case: = TO_CHAR (l_from, 'Dy', 'NLS_DATE_LANGUAGE = English').

    To_char (MOD (l_to - l_from + 1, 7));

    l_result: = l_to - l_from + 1

    -TRUNC ((l_to-l_from + 1) / 7) * 2

    -CASE

    WHEN l_case IN ('Mon6', 'Tue5', 'Wed4', 'Thu3', 'Fri2'

    , "Sat1", "Sun1", "Sun2', 'Sun3", "Sun4".

    , "Sun5', 'Sun6.

    )

    THEN 1

    WHEN l_case IN ('Tue6', 'Wed5', 'Wed6', 'Thu4', "Thu5"

    , 'Thu6', 'Fri3', 'Fri4', 'Fri5', 'Fri6 '.

    , "Sat2", "Sat3', 'Sat4', 'Sat5", "Sat6.

    )

    THEN 2

    0 OTHERWISE

    END

    ;

    IF SUPERIOR (p_public_holidays) = "Y".

    THEN

    SELECT l_result - COUNT (*)

    IN l_result

    OF public_holiday p

    WHERE p.calendar_day > = l_from

    AND p.calendar_day<=>

    AND SUBSTR (TO_CHAR (p.calendar_day

    , "Dy".

    'NLS_DATE_LANGUAGE = English'

    )

    , 1, 1 ) != 'S'

    ;

    END IF;

    RETURN l_result;

    EXCEPTION

    WHILE OTHERS

    THEN

    DBMS_OUTPUT. Put_line (' CTF nb_days (' |))

    To_char (p_date_from, "MON-DD-YYYY"). ', ' ||

    To_char (p_date_to, "MON-DD-YYYY"). ', ' ||

    p_public_holidays | ' ) : ' || SQLERRM

    );

    LIFT;

    END nb_days;

    /

    REM

    REM example:

    REM A) fill out the 'public_holidays '.

    REM

    TRUNCATE TABLE public_holiday;

    INSERT INTO public_holiday VALUES (DATE ' 2012-01-01', ' new year (a Sunday)');

    INSERT INTO public_holiday VALUES (DATE '' 2012-01-03, "for example");

    REM (insert other days...)

    COMMIT;

    Call the function for some pairs of dates of REM B)

    REM nb1: remove only Sat/Sun

    REM nb2: also remove holidays

    REM

    ALTER SESSION SET nls_date_format ='Dy DD-MON-YY';

    WITH some_dates AS

    (SELECT DATE ' 2011-12-29'd dual FROM

    UNION ALL SELECT DATE ' 2012-01-08' FROM dual

    UNION ALL SELECT DATE ' 2012-01-10' FROM dual

    )

    SELECT d1.d 'FROM '.

    , d2.d ' to THE '.

    , nb_days (d1.d, d2.d, ' don't) nb1

    , nb_days (d1.d, d2.d, 'Y') nb2

    OF some_dates d1

    some_dates d2

    WHERE d1.d<=>

    ORDER BY nb1, nb2, d1.d

    ;

    GO TO NB1 NB2

    ------------- ------------- ---- ----

    Monday, January 8, 12 Monday, January 8, 12 0 0

    Friday, December 29, 11 Friday, December 29, 11 1 1

    Wednesday, January 10, 12 Wednesday, January 10, 12 1 1

    Monday, January 8, 12 Wednesday, January 10, 12 2 2

    Friday, December 29, 11 Monday, January 8, 12 7 6

    Friday, December 29, 11 Wednesday, January 10, 12 9 8

    Hope that this could be useful, but note that this code has not been completely tested, so check and test before you trust it (in the case of any questions, please post a comment)

    Bruno Vroman.

    Best regards

    Bruno

  • Help SQL function

    Hi all

    I have a table which includes

    ID, first_name, last name and date of birth

    I want to retrieve all the records that have the same name and DOB

    for example.

    ID, first_name, last name, DOB

    1 xyz abc 01/01/2012

    hij 2 efg 15/05/2012

    3 xyz abc 01/01/2012

    4 xyz abc 01/01/2012

    so in the output of 1, 3 and 4 rows will appear only.

    can someone advise please on the appropriate SQL function

    Thanks in advance

    Hello

    One way is to use the analytical COUNT function:

    WITH got_num_rows AS

    (

    SELECT id, first_name, last_name, dob

    , COUNT (*) OVER (PARTITION BY first name

    last_name

    ,             dob

    ) AS num_rows

    FROM table_x

    )

    SELECT id, first_name, last_name, dob

    OF got_num_rows

    WHERE num_rows > 1

    ;

    The subquery is needed here, because the analytical functions are calculated after the WHERE clause has been applied.  To use the results of an anlytic function in a WHERE clause, you must calculate the function in a subquery, then you can use the results where you want (including the WHERE clause) of a Super query.

  • BEEP 10 g call a PL SQL function

    Hello..
    It's really breaking the feet... googled a lot but always back to square start.
    ... Well guys want to help me...

    I need to call a function from PL SQL BI editor passing 3 parameters.

    that means this feature is... it feeds a table.
    And the editor of BI report is read from the populated table...

    Kindly help me out here... How can I start...

    PL SQL function is a stand-alone... It is not under any procedure/package...

    If you could give me some small excerpts of what to write in the style of data... that would be great... and Yes, indeed, this is the old version of the BEEP... 30%

    >
    Total Questions: 11 (10 open)
    >
    Why can't anyone help you?

    >

    He throws me an error
    Variable binding does not exist

    any work arounds guy?
    >
    so

    
    

    and in z_report_sys_op_test_pkg.z_report_sys_op_test get the necessary value
    >
    substr (: Store, 0, InStr(:Store,'-') - 1).

  • XQuery SQL function

    Hello

    In a query XQuery is posssible to call a function or procedure SQL (PL / SQL)?
    Here is an example of what I had accomplished:


    SELECT THE PRD. XMLCOLUMN of
    XMLTABLE (' for $i in ora: view("P_iXXX")/LINE)
    $j in ora: view("P_jXXX")/LINE.
    where
    ($i / NSU_xxx = $j/NSU_xxx)
    return
    (
    < NCL >
    {
    $i / NSU_xxx,
    H3. CALL the SQL function? as sql_xxx
    for $k in ora: view("P_kxxx")/ROW
    ($vk/COD_RMP_VPM = "PRD")
    Return()
    }
    < / NCL >
    () "PATH of XMLType 'XMLCOLUMN' COLUMNS 'resultsqlfunction' INTEGER PATH 'xsql_xxx' INTEGER ACCESS to 'NSU_xxx' path 'NSU_xxx', '.') as the PRD;

    Thanks in advance for your answers
    François

    Who today replaces "ora: see?

    On 11.2, ora expansion feature: view() is deprecated in favor of the fn:collection("oradb:/") method:

    http://docs.Oracle.com/CD/E11882_01/AppDev.112/e23094/xdb_xquery.htm#BABECFFD

    My DBA database have installed Oracle XML DB to use the XMLType and XMLTable, I thought that these features among other things speed up the creation of XML.

    What are the benefits of using XQuery and XMLTable and XMLQUERY functions?

    Which version of the database you use?

    Please read: http://docs.oracle.com/cd/E11882_01/appdev.112/e23094/xdb_xquery.htm#CBAGCBGJ

    Is there another method to expedite the creation of XML?

    Publication of SQL/XML functions are probably the best way to create custom relational data XML documents.

    The basic functionality of XQuery is not to the RDBMS query tables or views, although Oracle provides extensions to do.
    Most of the time, I use XQuery (via XMLTable and XMLQuery) to do exactly the opposite, i.e. to extract XML data in a relational form, or the transformation of XML fragments.

    If your actual requests are slow - even if you need to define what that means and that you are pregnant - then maybe the SQL/XML functions are not the real problem.

    In a "Where clause" as I turn, I have several "outer join". Here is an example.

    where
    PPM. NSU_PPM = w.NSU_PPM and FRNS. NSU_FRN (+) IS FCO. NSU_FRN and FCO. NSU_FCO (+) IS PPM. NSU_FCO
    and T2O. NSQ_T2O (+) IS PPM. NSQ_T2O
    and T51. NSQ_T51 (+) IS PPM. NSQ_T51
    and TWU. NSU_STT (+) IS PPM. NSU_STT
    and T01. NSQ_T01 (+) IS PPM. NSQ_T01
    and vpm.cod_rmp_vpm (+) = "PRA".
    and vpm.num_vsn_vpm (+) = PPM.vsn_sup
    and w.nsu_ppm = A.nsu_ppm (+)
    and W.NSU_SOO = A_HEADER. NSU_SOO and A_HEADER. NOR_SOM = 0

    Yes, it's exactly what I was talking about.
    Transposing the logic for XQuery 1.0 is not the approach more simple (to say the least), because there is no direct support OUTER JOIN.
    XQuery 3.0 provides the functionality, but it is not yet here in the database.

    My suggestion would be to stick to the publication of SQL/XML functions.
    If you have a specific question about the performance, we (as the members of the forum) will be happy to help you.
    Provides the steps necessary to reproduce the problem, including some examples of data.

    Kind regards

    Marc.

  • No support for oracle sql functions

    Hi all

    Please can someone explain why the B-tree indexes are not capable of supporting SQL queries using the built-in functions of Oracle.

    We have indexes of tree b on account_no column.

    Select * from test_table where account_no = 11005208

    the above query use the index on account_no

    Select * from test_table where superior (account_no) = 11005208

    But this query does not use the index on the account_no, going for the full table scan.

    My question here is account_no is the numeric data type.
    Then, there is no difference between the data in the columns account_no and upper (account_no) column data, so why he does not use index when using sql functions in an sql query?

    Hello

    If you apply the upper function, Oracle implicitly converts its argument to a string, so your query is actually upper (to_char (account_no)).
    There is none HAVE fully functional in the optimizer and you do not expect to know everything and do all the conclusions that a human being can do. Why should Oracle re - write this type of query analysis the data type of the columns and features when it seems more natural programmer write a correct query (without capital letters in this example) or, if necessary, create an index based on a function?

Maybe you are looking for

  • Suddenly slow Firefox

    I would appreciate any help with this problem. I'm suddenly having trouble with Firefox. When I try to enter any field open on an open monitor, there is a significant lag between pressing the keys and the characters that appear on the screen. It star

  • export to iPhoto Photos

    I have a folder of iPhotos events in my conversion in Photos. I would like to export all the photos of 25K back to iPhotos using the same organization which is represented in my file of events iPhotos. Is this possible and if so, how it would accompl

  • I can't uninstall Xml notepad.msi

    My windows installer does not work on my computer, I downloaded XML notepad.msi. None of my Word Documents open.

  • VPN problem connection

  • hx400v firmware update

    Hello If I was updating the firmware of sony hx400v following this statement: http://www.Sony-MEA.com/support/download/597048/product/DSC-hx400v After updating verified the version of the camera I clecked then and he asked me to reset the device and