Data_Pipeline1.htm
 
Script : No Pipe Line

select tt from (select tt from (select rownum tt from all_objects where rownum < 50) order by dbms_random.value)dual where rownum <= 6

Now I will use custom PHP DDL query tool , you may use SQL*PLUS or SQL Developer Tool.

Create a table

create type tt_pipe1 as table of number;

Checking List of Objects:

SELECT object_name, object_id, object_type FROM user_objects
where object_type ='TYPE

Query confirms the new objet type created in Scott's account.

Now Create a table to pipeline or stream data , with PHP DDL web tool, or SQL Developer

create or replace function process_trans1(n in number)
return tt_pipe1
PIPELINED
as
begin
for i in 1 .. nvl(n,999999999)
loop
pipe row(i);
end loop;
return;
end;
/

Query injection was valid.

Let us confirm the type and function:

SELECT object_name, object_id, object_type FROM user_objects where object_name ='PROCESS_TRANS1' or object_type ='TYPE'

SELECT * FROM TABLE (PROCESS_TRANS1(5) )

Create a series of Dates:

select (to_date('31-JAN-2012')+ column_value-1) SERIES from TABLE(PROCESS_TRANS1(5))

Ordering at random

select (to_date('31-JAN-2012')+ column_value-1) SERIES from TABLE(PROCESS_TRANS1(5)) order by dbms_random.random

select (to_date('31-JAN-2012')+ column_value-1) SERIES from TABLE(PROCESS_TRANS1(5)) order by SERIES desc