Questions tagged [pipelined-function]

Use the result of a PL/SQL routine as if it were a table.

A pipelined function allows you to use a PL/SQL routine as if it is the source table for another operation like this:

SELECT * FROM TABLE ( schema_name.function_name([any parameters]));

This concept is known as in other relational database systems.

58 questions
7
votes
1 answer

Compiling a PL/SQL function in Oracle 11g2 XE sometimes leads to a ORA-00600: internal error

I have a PL/SQL function that I'm working with that sometimes compiles ok but sometime give me this error. ORA-00600: internal error code, arguments: [17285], [0x318FDE2C], [1], [0x273F1C60], [], [], [], [], [], [], [], [] 00600. 00000 - "internal…
Lallen
  • 518
  • 7
  • 13
7
votes
1 answer

Difference between Table Function and Pipelined Function?

CREATE OR REPLACE TYPE ty_1 AS OBJECT ( fn VARCHAR2(100), sl NUMBER, hd DATE ); CREATE OR REPLACE TYPE ty_1_table AS TABLE OF ty_1; CREATE OR REPLACE FUNCTION…
ramesh538
  • 167
  • 2
  • 5
6
votes
3 answers

SELECT * FROM TABLE(pipelined function): can I be sure of the order of the rows in the result?

In the following example, will I always get “1, 2”, or is it possible to get “2, 1” and can you tell me where in the documentation you see that guarantee if it exists? If the answer is yes, it means that without ORDER BY nor ORDER SIBLINGS there is…
Benoit
  • 76,634
  • 23
  • 210
  • 236
5
votes
1 answer

PLS-00653 Error on an empty line (Aggregate/table functions are not allowed in PL/SQL scope)

I'm trying to run a PL/SQL Script I made but I'm getting an error: PLS-00653: aggregate/table functions are not allowed in PL/SQL scope The problem here is not the error in itself but the line where it's being thrown from. Here's my PL/SQL block…
Elie G.
  • 1,514
  • 1
  • 22
  • 38
4
votes
2 answers

Oracle Pipelined function

I'm trying to create a function which returns an object that can be used in the FROM Clause. According to research on the oracle documentation I've found that a PIPELINED function is what I need. I have this code: CREATE TYPE type_struct AS…
Nuno Valente
  • 143
  • 2
  • 12
4
votes
2 answers

How to optimize usage of pipelined, weakly typed ref cursor

I am having some trouble with a procedure; when run for “big” sets (800+ parents, 1300+ children), it is very slow (30 - 60 secs). Basic idea is to fetch all parent records (and their respective children) fitting a certain search criteria, along…
3
votes
1 answer

Pipelining Between PL/SQL Table Functions

I have a package with 2 pipelined functions. When I'm trying to call one function with another function as it's argument I'm getting "ORA-06553: PLS-306: wrong number or types of arguments in call" error. Here is the package: create or replace…
brungel
  • 33
  • 4
3
votes
1 answer

Nested PIPELINED function in pl/sql

I have to write a nested pipelined function in pl/sql which I tried implementing in the following manner. create package body XYZ AS function main_xyz return data_type_1 pipelined is begin --code pipe row(sub_func); …
user256378
  • 35
  • 9
3
votes
2 answers

Rewrite recursion function as a pipeline functions composition

I'm writing my homework (CIS194 Haskell course). I must rewrite the following recursive function to pipeline functions (without obvious recursion). fun2 :: Integer -> Integer fun2 1 = 0 fun2 n | even n = n + fun2 ( n ‘div‘ 2 ) | otherwise =…
2
votes
1 answer

Oracle 19C database issue

I have a package working fine in 11g version. But when I deploy the same package in 19c version, the behavior is different. PFB the description. Package specification has an cursor and created a table type with cursor%rowtype. Having a pipelined…
Capricon
  • 21
  • 3
2
votes
2 answers

Want to Wrap PSList in a Powershell function to use pipeline values

I like PSList, and use the CPU and Elapsed times to indentify processes that need to be killed. I would like to wrap it in a powershell function that returns pipeline values so that I could do something like the following: get-remoteprocess server1…
Rene
  • 21
  • 3
2
votes
1 answer

PLSQL pipelined function to return a list

I'm trying to create a function to get a list of values from my database. After some researches I found that I need to use the PIPELINE function and I found some examples. I did my function but I somehow got 2 errors that I don't understand. Here's…
Abstern
  • 61
  • 8
2
votes
0 answers

Can I use Oracle Pipelined Function like a select in QueryDSL?

For a specific reason of a requirement, instead of using a VIEW, I use an Oracle pipelined function to get data in a table. It works perfectly using Native Query: "select * from (table (PAC_FOO_PIPELINED.FUNCTION_BAR(:fooDate, :barDate)))" The…
Odilon
  • 128
  • 1
  • 7
2
votes
2 answers

select from table with function using pipelined table functions and associative table

I need to return the table as a result of this select. The argument passed to the function opredelyaet from which an array of associative data will be displayed as a table: select * from table(task_2.get_con_coll('save')); I wrote this code and to…
2
votes
1 answer

Is using a SELECT inside a pipelined PL/SQL table function allowed?

The docs for pipelined functions say that DML is not allowed when they are used in a SQL statement (typically a SELECT), and in most examples the pipelined functions are used for data generation or transformation (accepting a custor as parameter),…
Lucero
  • 59,176
  • 9
  • 122
  • 152
1
2 3 4