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
Messages: 3
Registered: September 2006
Location: Hyderabad
Junior Member


My requirement to increment one record in cursor like

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

End if;

Is this correct.

Please give solution.


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
Messages: 3727
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: Escape ( and )
Goto Forum:

Current Time: Tue Aug 22 21:31:34 CDT 2017

Total time taken to generate the page: 0.01384 seconds