Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
![]() |
![]() |
Home -> Community -> Usenet -> c.d.o.misc -> Re: NEWBIE: converting MSSQL to oracle
On 16 Dec 2003 14:54:01 -0800, info_at_athinktank.com (PN) wrote:
> am trying to create a procedure to reuse of a query of the form
>
>select *
>from orders, orders_items
>where orders.order_id = orders_items.order_id
>AND order_ref = 'SOMEREF'
>and order_date < trunc(sysdate)
>and order_date >= trunc(sysdate-SOMENUMBER)
>
>the two parameters I would like to pass to the function are SOMEREF
>AND SOMENUMBER
You might look into table functions, which allow you to write
something like:
SELECT * FROM some_function(arg, arg);
I give an example of a table function in the following article:
http://www.oracle.com/oramag/oracle/01-sep/index.html?o51o9i.html
I know this must seem a lot more complicated than SQL Server makes it.
Jonathan Gennick --- Brighten the corner where you are http://Gennick.com
Join the Oracle-article list and receive one article on Oracle technologies per month by email. To join, visit http://four.pairlist.net/mailman/listinfo/oracle-article, or send email to Oracle-article-request_at_gennick.com and include the word "subscribe" in either the subject or body. Received on Tue Dec 16 2003 - 21:38:22 CST
![]() |
![]() |