Home » SQL & PL/SQL » SQL & PL/SQL » how can increment one record in cursor
how can increment one record in cursor [message #203874] Thu, 16 November 2006 14:42 Go to next message
vannala_sanjeev
Messages: 3
Registered: September 2006
Location: Hyderabad
Junior Member

Hi,

My requirement to increment one record in cursor like

--here I am opening cursor
Open mycursor
Loop
Fetch mycursor into rec
If ip[i] >= rec.minA And ip[i] =< rec.maxA
<<statements>>
--here I wants to increment one record of cursor how its possible
elsif ip[i] >= rec(1).minA And ip[i] =< rec(1).maxA
<<statements>>

End if;

Is this correct.

Please give solution.

Thanks



Re: how can increment one record in cursor [message #203898 is a reply to message #203874] Thu, 16 November 2006 21:10 Go to previous message
rleishman
Messages: 3724
Registered: October 2005
Location: Melbourne, Australia
Senior Member
What are MINA and MAXA? Do you mean FIRST and LAST? Is REC a record or collection? What is the sqare-bracket syntax [] for? PL/SQL collections use round brackets.

What do you mean by "increment one record of cursor"? Increment means "add 1" - how can you "add 1" to a record? You can only increment a scalar number.

I don't understand what you are trying to do, or even what language you are trying to do it in.

Try to explain your intent more clearly, and paste whatever REAL code you already have, including declarations.

Ross Leishman
Previous Topic: Why are these different?
Next Topic: PLS-00201: identifier 'ORDERSTOREDATA' must be declared (merged)
Goto Forum:
  


Current Time: Sun Dec 04 02:37:36 CST 2016

Total time taken to generate the page: 0.08320 seconds