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: NEWBIE: converting MSSQL to oracle

Re: NEWBIE: converting MSSQL to oracle

From: Jonathan Gennick <jonathan_at_gennick.com>
Date: Tue, 16 Dec 2003 22:37:23 -0500
Message-ID: <vnjvtvgajmu2id7m1htagl8bd5hdiqm2fe@4ax.com>


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:37:23 CST

Original text of this message

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