Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Usenet -> c.d.o.server -> Create View Problem
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