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 -> Help: A difficult request

Help: A difficult request

From: Joe Bayer <u705413818_at_spawnkill.ip-mobilphone.net>
Date: Thu, 16 May 2002 20:46:48 GMT
Message-ID: <l.1021582008.1213226318@[64.94.198.252]>


My boss asks me to let user select from a table for only one row each time, which is very difficult to achieve

for example

SQL> select * from test;

SCHEMA_NAME SCHEMA_VALUE
-------------------- --------------------

A                          a
B                          b
C                          c
D                          d
E                          e
F                          f

6 rows selected.

Each time, we just want user to see one row, so I created a view  

  1 CREATE OR REPLACE VIEW test_view AS   3 SELECT *
  4 FROM test
  5* WHERE rownum < 2
SQL> / View created.

but I can only select the first row of the table

  1 select * from test_view
  2* where schema_name='A'
SQL> / SCHEMA_NAME SCHEMA_VALUE
-------------------- --------------------

A                     a

1 select * from test_view
  2* where schema_name='B'
SQL> / no rows selected

can somebody help?

thanks  

-- 
Sent by joebayerii  from hotmail  subpart from  com
This is a spam protected message. Please answer with reference header.
Posted via http://www.usenet-replayer.com/cgi/content/new
Received on Thu May 16 2002 - 15:46:48 CDT

Original text of this message

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