View previous topic :: View next topic
|
Author |
Message |
sasi.palani
New User
Joined: 01 Jun 2005 Posts: 14
|
|
|
|
If I am declaring cursor with where clause condition, if condition not met, what will happen? |
|
Back to top |
|
|
priya
Moderator
Joined: 24 Jul 2003 Posts: 568 Location: Bangalore
|
|
|
|
If condition not met. you will get an error....
UNDECLARED CURSOR (Only if you try to open the cursor in your pgm) |
|
Back to top |
|
|
kvivek
New User
Joined: 09 May 2005 Posts: 51 Location: Singapore
|
|
|
|
You will get sqlcode +100 when you try to fetch the cursor for the first time itself.
Regards,
Vivek |
|
Back to top |
|
|
j_prameela2000
New User
Joined: 01 Jun 2005 Posts: 28 Location: Chennai
|
|
|
|
Hi Sasi,
When the condition is not met, cursor will not be created. No records will be fetched. Once when you open the cursor using open command itself will raise an error. Correct me if i am wrong. |
|
Back to top |
|
|
subbprem
New User
Joined: 20 Apr 2005 Posts: 9 Location: Chennai
|
|
|
|
Hi,
When the cursor is declared properly and if the condition is not met then you will get sqlcode +100 in first fetch itself, which means no to row to fetch.There will be no problem in opening the cursor.
If there is any error in cursor declaration then we will end-up with pre compilation error.
Correct me if anything is wrong.
Regards,
Prema. |
|
Back to top |
|
|
|