pipeline function and type inside the package

Hi all

I'm sorry for the inconvenience, I tried to google my question before asking here...

The question is:
I can't compile type in the same package as my function in the pipeline?

I have an example of a function in the package, everything works fine.
CREATE OR REPLACE PACKAGE ZOO.pkg_cl_risk_eval  AS

FUNCTION sample (p_date date, p_indicatorid number, p_ismodel number) return cl_risk_act pipelined;

END;
/

CREATE OR REPLACE PACKAGE BODY pkg_cl_risk_eval is

FUNCTION sample (p_date date, p_indicatorid number, p_ismodel number) return cl_risk_act pipelined IS
v_obj cl_risk_type := cl_risk_type(NULL,NULL,NULL,NULL);
BEGIN
FOR e IN (
select trunc(sysdate) as adate, 0 as cid, 0 as indicatorid, case when p_ismodel = 0 then 0 else 1 end as value from dual
              )
LOOP
v_obj.adate        := e.adate;
v_obj.cid            := e.cid;
v_obj.indicatorid := e.indicatorid;
v_obj.value        := e.value;
PIPE ROW (v_obj);
END LOOP;
RETURN;
end;

end;
/
SELECT using function statement:
select * from table(zoo.pkg_cl_risk_eval.sample(date '2011-09-30',4, 0))
I can't compile type in the same package as my function in the pipeline?
Currently, it is outside the package:
DROP TYPE cl_risk_type FORCE;
CREATE OR REPLACE TYPE cl_risk_type AS OBJECT
( adate date,
  cid   number(10), 
  indicatorid number(5), 
  value number(5)
)
/ 

CREATE OR REPLACE TYPE cl_risk_act AS TABLE OF cl_risk_type
/ 
As far as I can read from this source, it is impossible, but this information can be updated.
http://asktom.Oracle.com/pls/Apex/f?p=100:11:0:P11_QUESTION_ID:4447489221109

Oracle version: 11g

UPD:
I'm sorry, I'm not paying attention... It is possible as noted in the response to my similar question:
function in pipeline work in the package? (Oracle 11g)

Published by: marco on December 15, 2011 07:40

As the following State messages, my post was wrong. I withdraw without reservation.

Published by: APC on December 15, 2011 15:30

Tags: Database

Similar Questions

  • Oracle form functions and procedures in the APEX, how?

    I'm working to recreate in the APEX, already existing read only forms in Oracle Forms. Report features interactive APEX among other things, in fact worth as well as to target a different audience than utilizies versions of Oracle Form. Versions of Oracle Forms use a lot of pre and post query triggers, PLSQL functions.

    In Oracle Forms that places, these functions can be found in the "Units of program" section of the form. A feature typical of this kind, based on a particular Mission ID route, collecting names of regular passengers, is shaped with a comma and a space after each of them, in a single string that is returned and displayed the list of passengers of a line.

    I have all of this written code so I can move most of the main request of the Oracle form in an interactive report. These functions and triggers called in the form of the "Units of program" section of the Oracle form rather than stored in the database schema in a package, where they would go inside the APEX? Can I create a 'shortcut' in the APEX and call it from the interactive report "Source Région"? I can create the PLSQL function at the level of the region of the interactive report or page level? Or, my best bet creates a package that is stored in the database, all these functions and/or proecedures I might need the original form of Oracle?

    Some advice would be greatly appreciated.

    RLBickham wrote:
    I don't think I've been pretty clear in the description of the specific thing I want to do, simply, it does not reach the level of forms of conversion of the APEX. It is basically a problem of PLSQL function.

    I have an interactive report which is currently 90 percent of what I want however, each line, which represents a Mission may have several feet. Each arm has two places or ICAO codes attached to it. Based on the number of Mission, I want to loop through the array of leg, collect all the codes of ICAO for this Mission, put them together in 1 variable separated by a coma and add this variable to display the columns in this interactive report as the last column.

    In Oracle Forms, I have a function registered in the database, which is called in the main query. Maybe I ask a question that does not need to be asked, but anyway my question is can I put this function currently in the database somewhere within the interactive report and somehow reference it via Http, or should I just stick with set of functions and procedures in the packages stored in the database and called the conventional way?

    You could switch the function to the database and call it from the report query, but it sounds as if it were superfluous. In the report query using any form of Re: 4. How can I convert rows to columns? is appropriate for your version of the (unspecified) database.

    -----

    When you have a problem, you will get an answer faster, more efficient including information as much information as possible from the outset. This should include:

  • Full version of APEX
  • Complete operating system DB, version, edition, host
  • Architecture of Web server (EPG, SST or APEX listener/host operating system)
  • Browser (s) and version (s) used
  • Theme
  • Model (s)

  • Region/section type (s) (particularly as to distinguish if a 'report' is a standard report, an interactive report, or indeed a 'update report' (i.e. a tabular presentation))

    With APEX, we also had the chance to have a great resource in apex.oracle.com where we can reproduce and share problems. Reproduce things is the best way to solve most of the questions, particularly those relating to the layout and Visual formatting. If you expect a detailed response it is appropriate that you take on an important part of the effort by getting as much as possible with an example of the problem on apex.oracle.com before asking for help on specific issues, then we can see firsthand.

  • I need serious help please... We do translations of textbooks, I searched an excessive type function but have been unable to find, we are working in indesign CS 5. It takes allot of time to delete the text and type in the new language.

    I need serious help please... We do translations of textbooks, I searched an excessive type function but have been unable to find, we are working in indesign CS 5. It takes allot of time to delete the text and type in the new language.

    Argh it's frustrating! I never noticed that the key was not working in InDesign.

    A bit of research and it turns out that the MS Office has this as an option in their software. But I can't find an option in the InDesign preferences to make it work.

    However, somethings do not appear in the shortcuts and preferences and are hidden triggers in InDesign that are accessible via a script.

    I'm not saying that it is possible to activate the button insert by using a script, but it is plausible that he can be activated.

    Maybe ask on the forum script? Scripting InDesign

    I know that this may be a possibility as with InDesign prior to export PDF documents interactive versions, there was previously no way to export PDFs interactive as unique pages if the gaps of.

    But the option to toggle this setting was scriptable.

  • Can't see the network PC MAC computer, unless I have use RUN in the start menu and type in the IP address.

    Original title: MAC to PC NETWORKING.

    I added my Mac to my PC network workgroup.  I can see the PC from my Mac, but not my Mac to the PC network puts unless I have use RUN in the start menu and type in the IP address. I am running XP Pro SP3.

    Hi markymo777,

    I suggest you to check if you can see the MAC computer with the UNC path - \\computername\sharename. Later, check to see if the problem persists.

    Hope the helps of information.
    Please post back and we do know.

  • How can I set the default font size and type for the outgoing Hotmail mail?

    How can I set the default font size and type for the outgoing Hotmail mail?

    Hi Dale,

    What is the email client do you use?

    Outlook can be configured per - start Outlook-> Tools-> Options-> mail-> fixed Format and fonts... Select the font and size you need... Click ok on all screens.

    I hope this helps.

  • Script to create the folder on the physical disk and not in the package

    Hello-

    Attached is a script that I have which will create a folder on the C:\ inside the bubble.  What I need, it's so he can create a folder on the physical disk and not inside the bubble.  Can someone tell me what I did wrong here?  I have a similar script which creates a folder on the D drive for the linked clones and it works fine.  Thanks in advance!

    Change the isolation mode of the file %drive_C%\vaforms5 'Merged' into the Attributes.ini, rebuild the ThinApp and check.

    With the help of isolation have merged, the application can read/write file on the physical machine.

  • using Record statistics for session/Interface inside the package

    Oracle DB / ODI.
    I have a package starting with Interface.
    In the second step, I want to know how many records has been inserted/updated the first interface. Let that say those numbers will be used on the second interface.
    How can I do? Is it possible to access this information inside the package?
    Something similar to SQL % ROWCOUNT in ODI?

    Try this in variable refresh

    Select to_number (< %="odiRef.getPrevStepLog("INSERT_COUNT")%">) + to_number (<%=odiRef.getPrevStepLog("UPDATE_COUNT")%>) of the double

  • How to use a function inside the package?

    Hello

    You will need to convert weight unit of kilogram kips when filling out the weight values into a temporary table. In our database, schema there is a function called convert_units is available.
    How could I use this feature in my package? My package is also resides in the same database schema.

    Here, I pasted the function.
         convert_units
       (
         in_base_unit_id       NUMBER,
         in_conversion_unit_id NUMBER,
         in_value              NUMBER
       ) RETURN NUMBER AS
    CURSOR unit_cur IS
      SELECT *
      FROM units_conversion
      WHERE base_unit_id = in_base_unit_id
        AND conversion_unit_id = in_conversion_unit_id;
    unit_rec unit_cur%ROWTYPE;
    BEGIN
      OPEN unit_cur;
      FETCH unit_cur INTO unit_rec;
      IF unit_cur%NOTFOUND THEN
        unit_rec := NULL;
      END IF;
      CLOSE unit_cur;
      RETURN (in_value+unit_rec.pre_adjust_add)*(unit_rec.rate);
    END convert_units;

    Hello

    It seems that the first two arguments of this function are ID in the units_conversion table. If you know this id = 1234 means kilograms, 9876 means kips, then you can do things like:

    wt_kips := convert_units (1234, 9876, wt_kilograms);
    

    or

    INSERT INTO tmp_table ( ..., weight_val,                               ...)
           VALUES           ( ..., convert_units (1234, 9876, wt_kilograms), ...);
    

    I can't just look at the code which could be any valid ID. I'm not even sure of the order of the arguments. I hope you have instructions on how to use the function.

    If the function is in a package named pk_xyz (a different package to the one in which you call it), add the name of the package, like this

    wt_kips := pk_xyz.convert_units (1234, 9876, wt_kilograms);
    
  • Q on the buttons and animations inside the mc

    OK, it's a long question - sorry (and I'm new to FLASH if it sounds stupid).

    I'm creating a simple "tamagotchi". It is a cute creature onstage, it has 4 buttons next to it (power, sleep, play and 'cute')

    So, I created a long chronology of 15 images in the main stage. To frame 1, I had 'cute', frame 5 I got 'food', frame 10 I 'play' and frame 15 I had 'sleep '.

    I accumulate animation in this way: each of the images (1, 5, 10, 15) has a movieclip with an animation inside - for example "play" to the 10 member contains a movieclip and inside this movieclip I have an animation that I want to play.

    But but... the buttons... If I put the buttons inside the animation and push 'play' it works fine, but I can't get out of this animation and more to for example "food".

    If I put the buttons on the main stage, it will play only 10-15 image when I press 'play', because I can't understand that he must go inside the movieclip and it play.

    So the main question: is there a function saying "touches you - get out of this animation in the main stage and other animation and play that!"?

    Or y at - it an easier way to do this? I tried to copy all the layers of an animation and paste it into the main stage, but when I do it this way, items in layers appear randomly on the stage, which means that I have to put it all together again. AND it will be a very long timeline if I do it this way.

    I hope I make sense?

    It is all back now, so I can see things from new... from what I have just described, your code frame 1 will be replaced by...

    button_1.addEventListener (MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame_1);

    function fl_ClickToGoToAndPlayFromFrame_1(event:MouseEvent):void
    {
    gotoAndStop ("nuttet");
    }

    'Play' button

    leg_btn.addEventListener (MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame_2);

    function fl_ClickToGoToAndPlayFromFrame_2(event:MouseEvent):void
    {
    gotoAndStop ("leg");
    }

    Power button

    mad_btn.addEventListener (MouseEvent.CLICK, fl_ClickToGoToAndPlayFromFrame_10);

    function fl_ClickToGoToAndPlayFromFrame_10(event:MouseEvent):void
    {
    gotoAndStop ("mad");
    }

    and if your movieclips have a stop at their first image, then these images you would order for the involved movieclip, meaning the 5 frame you order... leg.play ();

  • Is a global functional with loops inside the structure of cases subject to the race condition?

    Like this one:

    Global variables funtional implement Mutual Exclusion for their confined i.e. code section of the code in the FGV cannot run once at the time by all processes with competing concurrent access. With this in mind, all the code inside will be executed while one task has access, then released once the FGV has completed the operation. The structures listed as your curls and case Structures are not in themselves share resources, so there is no problem with conditions of competition in this area.

    You would only if worry if the functional Global Variable wrote to other resources shared in a way that is not properly synchronized.

  • A query related to ProgressBar and implementation inside the container

    Hello

    I tried an example with Flex3 ProgressBar. I write the scenario in which it was OK in one case and bad in another case.

    Please tell me what's not here in the case of wrong:

    The program is linked to:
    I have the button when click on that I load the Image. There is no button and its event listener mentioned here.

    Correct approach:

    This works also very well the Image and ProgressBar are in the same container called HBox

    < mx:HBox >

    < mx:Image id = autoload "image" = "false" / >

    < mx:ProgressBar id = "MYPB" source = "{image}" / >

    < / mx:HBox >


    Wrong approach:

    Below does not work as I placed the ProgressBar outside the container called as HBox

    < mx:HBox >

    < mx:Image id = autoload "image" = "false" / >

    < / mx:HBox >

    < mx:ProgressBar id = "MYPB" source = "{image}" / >

    Please share your ideas like why it behaves in this way.

    Hi Kiran.

    I don't think that either the approach is wrong, it no way performed by placing the ProgressBar inside a container or outside the container.

    Run the sample application below. It loads to the two approaches.


    http://www.Adobe.com/2006/mxml"layout ="vertical">

            public function loadImage1 (): void {}
    Image1. Load('assets/liazon_logo.png');
    }
               
    public function loadImage2 (): void {}
    Image2. Load('assets/liazon_logo.png');
    }
    ]]>
       


     


     
     

    If this post answers your question or assistance, please mark it as such.

    Thank you

    Jean Claude Chari

  • Problems with the sound function and scrolling on the touchpad on my Satellite A500/026

    Hello

    I just brought a new laptop A500/026 and when I play music from my ipod I get a little static pop sound at regular intervals during the song... this happens on all my music. I accidentally scroll horizontally through my touhpad and my screen minimizes or maximizes. I try to find how I did it, but can never seem to return to its normal state. There is obviously some sort of function here, can someone help me with it? I installed the x 64 bit version of windows 7.

    Thank you

    Eddie

    Hello

    The touchpad settings are placed in Control Panel-> mouse
    You can find the additional tab which would be you can access touchpad properties.

    As I know the touchpad properties contains many different options that allows you to configure the scrolling function, to activate and assign different actions to the touchpad corners, etc.

    Check it!

  • MBP13'-keyboard blocked permanently on shift + option and type in the symbols...

    Greetings,

    I'm typing this from a bluetooth keyboard.

    ASDF on bluetooth = AIII (on the keyboard physics mpb)

    So far, I have

    check the sticky keys

    checked the input language

    deactivated and reactivated (shift, option, command, control)

    formatted and installed El-Capitan (of Yosemite - where the problem occurred suddenly)

    virtual keyboard shows no key

    noticed that this happens when I type in my login information when starting

    has confirmed that it is shift-option installed carabiner and noticed symptoms subside

    ---------

    My guess is hardware failure...

    can anyone help?

    also, I first noticed this happens after that I have not used my computer for about a week or so trying to connect on Sunday and had to open a session as a guest and begin troubleshooting, then added the bluetooth keyboard - where I can't type no problem at all...

    Thank you!

    The System Management Controller SMC is a type controller included in your Mac computer that does many things at low altitude for you, including the management of simple keyboard.

    Try to do a Reset of the MSC to fix the problem.

  • Why can't I add a text box and type from the top of the box down. It always starts in the Middle

    I created forms and need a large text box for people to enter information over there. It allows me to draw a text box, but when I got to type enter you in the text box in the Middle instead of the top of the text box.

    You must define a multiline field.

    Tuesday, October 20, 2015-17:56, hollyh3271626 [email protected]>

  • PartialTrigger of different region and targets inside the iterator.

    Hello

    I use 11.1.1.6. Basically, I've got A Taskflow is a region that has inside an iterator that creates several commandLinks. I need to refresh a component of the parent page (one is the region) so I will try to accomplish the task using partialTriggers on components of commandLinks.

    My region ID is = r1, so I put the partialTrigger = "r1:iter1:cl1", but does not work. If I put a commandButton control in my taskflow region but outside of the iterator and defining the partialTriggers = "r1:cb1" then it works.

    An idea to solve this, or a different approach?

    Never mind. This works if partialTrigger = "r1:iter1:cl1" is used. It was that I was wrong using IDs.

Maybe you are looking for

  • local folders default reply address is outdated email account

    I've recently set up TB (31.4.0, windows 7 pro), import a set of local folders and emails to outlook express. TB has associated the latter with an address e-mail which I use is more, although there are always and sometimes I receive mail on this subj

  • I can do my email being hacked

    2 days ago my email has been compromised.  Several people are emails unsolicited computer is locked until I followed the instructions online, and it seemed fixed. I changed my password.   I am running 10.7.5 But the same thing happened to our other A

  • R850-169 - key on the keyboard to replace satellite

    Hi, I dropped my iphone on my laptop (of less than 30cm, I might add) and in some way he hit the right CTRL key and the key on the keyboard is popped! a whole little plastic broke from under the key (the mount under the white key is fine, just the bl

  • Can I recover emails in Outlook Express after a clean reinstall of windows XP?

    I performed a clean reistall windows XP and lost my AddressBook and emails. I didn't, that, unlike most e-mail systems, that Outlook Express was actually located on my computer. Is there a way to recover these emails or I just learned a lesson?

  • Journal of the frozen off the screen

    frozen laptop computer logging off and does not meet all the keys has been so for 12 hours, even after restarting mode 'sleep' on the log off screen