Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Return table from function

Re: Return table from function

From: <methodmano_at_gmail.com>
Date: 13 Apr 2007 13:12:11 -0700
Message-ID: <1176495131.552477.169970@d57g2000hsg.googlegroups.com>


On Apr 13, 2:23 pm, sybra..._at_hccnet.nl wrote:
> On 13 Apr 2007 09:17:23 -0700, methodm..._at_gmail.com wrote:
>
>
>
> >I'm a MS SQL Server developer, but have an Oracle project I'm working
> >on now. I have a function in MS SQL Server that I need to translate to
> >Oracle using PL/SQL Developer. How can I do this in Oracle? Thanks!
>
> >I'm using:
>
> >INSERT INTO [TABLE]
> >SELECT * FROM dbo.[FUNCTION]
>
> >Where [FUNCTION] is defined as:
>
> >CREATE FUNCTION [FUNCTION](... DECLARE INPUT VARIABLES ...)
> >RETURNS @TEMP_DTE TABLE
> > (
> > ... DECLARE TABLE FIELDS ...
> > )
> >AS
> >BEGIN
> > ...DO SOME STUFF...
> > INSERT INTO @TEMP_DTE VALUES (...VALUES...)
> > RETURN
> >END
>
> Look up PIPELINED functions in your documentation.
> Do NOT assume Oracle is Sqlserver sold by a different vendor.
> Do NOT 'port' your code. The users of your 'application' will love to
> lynch you.
>
> --
> Sybrand Bakker
> Senior Oracle DBA

Thanks for the information. I was able duplicate this by creating my object/type and then using the pipelined feature. Thanks! Received on Fri Apr 13 2007 - 15:12:11 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US