Strode procedure order by using oracle 9i.
Posted on 2004-04-02
i need to make SP where I want to get 5 last modified messages.
This is forum tables where I have 3 tables 1 for messages , thread and forums . Thread table contains all forums information like threadID,forumID,rootmsgID . all messages are in messages tables . I want 2 display one msg from one thread and total 5 last modified msg from all forums.
Ef = forums
Et = thread
CREATE OR REPLACE PROCEDURE ABC IS
cursor c1 is
select em.SUBJECT,em.thID,EM.MODIFIEDDATE from ef,em,et
ef.fID = et.fID and
et.thID = em.thID
ORDER BY EM.MODIFIEDDATE DESC;
for i in c1 loop
if (c1%rowCOUNT < 5) THEN
I don’t know this procedure is working or now coz, I tried in my jsp script It was not working.