View previous topic :: View next topic |
Author |
Message |
vinnay Beginner
Joined: 13 Mar 2006 Posts: 15 Topics: 9
|
Posted: Wed Aug 02, 2006 6:02 am Post subject: Fetch cursor and declare cursor different number of columns |
|
|
Can we declare a cursor for 5 selecting 5 columns and while fetching we give 6 variables in cobol program.
If this is correct can u tell what is the which will be getting into the extra column
example:
Code: |
declare cursor sel1
select a,b,c
from table
fetch sel1 into
:A,
:B,
:C
:D
|
Thanks & Regards
Vinay |
|
Back to top |
|
 |
sriramla Beginner
Joined: 22 Feb 2003 Posts: 74 Topics: 1
|
Posted: Wed Aug 02, 2006 8:12 am Post subject: |
|
|
If you code this and try, you will see whether you get a clean compiled code or not to begin with. By any chance you get a clean compile & a clean bind, you can run this program to see what happens. It would be nice if you can post back the results. |
|
Back to top |
|
 |
Maximus Beginner
Joined: 17 Nov 2005 Posts: 21 Topics: 11
|
Posted: Fri Aug 04, 2006 4:50 am Post subject: |
|
|
Vinay,
If C can be nullable, then extra column D will hold the null indiactor value.
Regards,
Maximus |
|
Back to top |
|
 |
|
|