| quering list partition [message #320856] |
Fri, 16 May 2008 08:14  |
nasir_mughal
Messages: 122 Registered: April 2007 Location: Karachi
|
Senior Member |
|
|
i have created three list paritionS p_2007,p_2008 and p_2009 on "year" column in the "transactions" table
anyone help me
why this code returns exception
DECLARE
N_SRNO TRANSACTIONS.SRNO%TYPE;
BEGIN
N_SRNO:=0;
SELECT NVL(MAX(SRNO),0) INTO N_SRNO
FROM TRANSACTIONS PARTITION (P_2009)
WHERE BOOK='RSS-PI';
N_SRNO:=NVL(N_SRNO,0)+1;
MESSAGE(N_SRNO);MESSAGE(N_SRNO);MESSAGE(N_SRNO);
END;
if i execute it without giving partition name it also retun exception
DECLARE
N_SRNO TRANSACTIONS.SRNO%TYPE;
BEGIN
N_SRNO:=0;
SELECT NVL(MAX(SRNO),0) INTO N_SRNO
FROM TRANSACTIONS
WHERE BOOK='RSS-PI';
N_SRNO:=NVL(N_SRNO,0)+1;
MESSAGE(N_SRNO);MESSAGE(N_SRNO);MESSAGE(N_SRNO);
please HELP ME
END;
|
|
|
|
|
|
| Re: quering list partition [message #321317 is a reply to message #320856] |
Mon, 19 May 2008 20:19  |
 |
Barbara Boehmer
Messages: 9106 Registered: November 2002 Location: California, USA
|
Senior Member |
|
|
|
What "exception" does it "return"? You need to post a copy and paste of a run of the code from SQL*Plus, complete with line numbers and complete results, including the "exception", and any other relevant information. Please read the forum guidelines at the top of the page for what we expect.
|
|
|
|