‎2007 Apr 23 4:13 AM
hi,
if we hav 10000 records in a list.suppose we want to retrieve 6 records .,without using where clause in select statement. and also that records r stored in random places...how to retrieve without where clause.
thanx.
vijay
‎2007 Apr 23 6:18 AM
Hi,
You can <b>create view with condition</b> so that you have got all 6 record exactly.
Reg,
Hariharan Natarajan.
‎2007 Apr 23 7:23 AM
Hai Vijay,
If that Database table is having indxes,You can use them.
Indexes are not specified in the where clause.
Hers is sample code using indexes.Here index is on first column of Database table.
Have a look at this.
DATA:
xcarrid LIKE SPFLI-carrid,
xconnid LIKE SPFLI-connid,
xcityfrom LIKE SPFLI-cityfrom.
SELECT carrid connid cityfrom
FROM spfli
INTO (xcarrid, xconnid, xcityfrom)
WHERE carrid = 'LH ' AND cityfrom = 'FRANKFURT'
<b> %_HINTS ORACLE 'INDEX("SPFLI" "SPFLI~001")'</b>
.
WRITE: / xcarrid, xconnid, xcityfrom.
ENDSELECT.
This type of selection improves the performance a lot when the records are very high.
Hope this helps you.
<b>Reward points if it helps you.</b>
Regds,
Rama chary.Pammi
‎2007 Apr 24 4:47 AM
You can try with view maintenance...
the attached link has few suggestions which can be used..