Home » SQL & PL/SQL » SQL & PL/SQL » Pipelined function (Oracle,10g,Linux)
Pipelined function [message #396806] Wed, 08 April 2009 01:57 Go to next message
sundarfaq
Messages: 235
Registered: October 2007
Location: Chennai
Senior Member
Hi,

How to give input arguments from table into pipelined functions.

I have executed sucessfully for below query.

select * from table(split_string('lan',','))

lan.

i don't know how to pass input argument into pipelined functions from tables.

simple stored functions:

select get_length(employee_id) from employees;

i need to execute the pipelined functions like this..

please provide steps..
Re: Pipelined function [message #396817 is a reply to message #396806] Wed, 08 April 2009 02:07 Go to previous messageGo to next message
Michel Cadot
Messages: 64122
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Syntax is syntax, the first query is how a pipelined function has to be called.
Now if you explain in details what you want, with an example, maybe we can help you.

Regards
Michel
Re: Pipelined function [message #396835 is a reply to message #396806] Wed, 08 April 2009 02:32 Go to previous messageGo to next message
sundarfaq
Messages: 235
Registered: October 2007
Location: Chennai
Senior Member
for example,

i need to pass all employee_name into below functions from employees table.

select * from table(split_string(employee_name,',')) from employees

but i got ORA-00933: SQL command not properly ended error.

I think, the above steps are wrong method.

please give an instructions.
Re: Pipelined function [message #396843 is a reply to message #396835] Wed, 08 April 2009 02:46 Go to previous messageGo to next message
delna.sexy
Messages: 941
Registered: December 2008
Location: Surat, The Diamond City
Senior Member
table() function works as table.
You can not specify FROM twice.
Use it as

select * from table(split_string(employee_name,','));


regards,
Delna
Re: Pipelined function [message #396846 is a reply to message #396806] Wed, 08 April 2009 02:49 Go to previous messageGo to next message
sundarfaq
Messages: 235
Registered: October 2007
Location: Chennai
Senior Member
ORA-00904: "employee_name": invalid identifier while executing the given scripts.
Re: Pipelined function [message #396847 is a reply to message #396835] Wed, 08 April 2009 02:52 Go to previous messageGo to next message
Michel Cadot
Messages: 64122
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Quote:
select * from table(split_string(employee_name,',')) from employees

What would this mean? What is it intended to do?
Where does employee_name come from? employees?

Regards
Michel
Re: Pipelined function [message #396857 is a reply to message #396847] Wed, 08 April 2009 03:13 Go to previous message
ramoradba
Messages: 2454
Registered: January 2009
Location: AndhraPradesh,Hyderabad,I...
Senior Member
i think this article will help you
http://www.databasejournal.com/features/oracle/article.php/2222781/Returning-Rows-Through-a-Table-Function-in-Oracle.htm#fig1

Thanks & regards
Sriram
Previous Topic: When we cant apply self join
Next Topic: DROP SORT ROLLBACK inquiries
Goto Forum:
  


Current Time: Wed Dec 07 05:12:41 CST 2016

Total time taken to generate the page: 0.09370 seconds