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

Home -> Community -> Usenet -> c.d.o.server -> Create View Problem

Create View Problem

From: Ronald Uhlig <roul_at_gmx.de>
Date: 15 Jan 2003 05:25:29 -0800
Message-ID: <bf7e8fc9.0301150525.3438e64a@posting.google.com>


Hi,
I have a table with several prices that are valid from a specific date.

sku : VARCHAR2(28)
price : NUMBER(38)
validFrom : DATE

Now I want to create a view that shows me the prices that are currently valid.
The statement below shows how to get the appropriate row for one specific product.

select * from productprice where validfrom < sysdate and sku='4711' and rownum=1 order by (sysdate-validfrom) ASC

I've no clue how to create this view. I just wanted to use a subselect, but rownum and order by clauses are not allowed in that. Can you give me a hint?

Thanks, Ronald Received on Wed Jan 15 2003 - 07:25:29 CST

Original text of this message

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