Home » SQL & PL/SQL » SQL & PL/SQL » quering list partition (oracle 9i, Forms 6i)
quering list partition [message #320856] Fri, 16 May 2008 08:14 Go to next message
nasir_mughal
Messages: 121
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 #321313 is a reply to message #320856] Mon, 19 May 2008 19:58 Go to previous messageGo to next message
djmartin
Messages: 10180
Registered: March 2005
Location: Surges Bay TAS Australia
Senior Member
Account Moderator
I moved this question from the Forms forum. Can someone here help this person?

David
Re: quering list partition [message #321317 is a reply to message #320856] Mon, 19 May 2008 20:19 Go to previous message
Barbara Boehmer
Messages: 8737
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.
Previous Topic: granting privlages to newly created user
Next Topic: Single Index with many columns or Multiple Indexes with fewer columns?
Goto Forum:
  


Current Time: Wed Aug 23 03:15:51 CDT 2017

Total time taken to generate the page: 0.05138 seconds