Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: Return table from function
On 13 Apr 2007 09:17:23 -0700, methodmano_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 DBAReceived on Fri Apr 13 2007 - 13:23:35 CDT
![]() |
![]() |