Hi guys,
I have an issue and I need your help please, it is something like this:
- I have cursor
declare cursor mycursor
select column1, column2 etc (a lot of columns) from mytable
group by column1, column2,..
order by column1, column2, ..
exec sql
open mycursor
dow sqlocode=0;
exec sql
fetch mycursor
into :vcolumn1, vcolumn2 etc
if sqlcode = 0; ---> sqlcode=-420 after the fetch
--> the rest of traitement --> I don't
else;
error
briefly I have an issue when it tries to make the fetch, I have an sqlcode=-420 and sqlstate=22018, it is a problem with one of the variables where it tries to load the values retrieved by the select statement?
How can I found exactly the column and the variable ko, with problems? I think it is a problem with data types of a variable in the fetch statement,..
the variables of the fetch statement was declared with like other zones of another file, it is possible to be changed one of them or I don't know why it doesn't work anymore
and I have a lot of columns in the select statement& a lot of variables in the fetch statement
Thanks
I have an issue and I need your help please, it is something like this:
- I have cursor
declare cursor mycursor
select column1, column2 etc (a lot of columns) from mytable
group by column1, column2,..
order by column1, column2, ..
exec sql
open mycursor
dow sqlocode=0;
exec sql
fetch mycursor
into :vcolumn1, vcolumn2 etc
if sqlcode = 0; ---> sqlcode=-420 after the fetch
--> the rest of traitement --> I don't
else;
error
briefly I have an issue when it tries to make the fetch, I have an sqlcode=-420 and sqlstate=22018, it is a problem with one of the variables where it tries to load the values retrieved by the select statement?
How can I found exactly the column and the variable ko, with problems? I think it is a problem with data types of a variable in the fetch statement,..
the variables of the fetch statement was declared with like other zones of another file, it is possible to be changed one of them or I don't know why it doesn't work anymore
and I have a lot of columns in the select statement& a lot of variables in the fetch statement
Thanks





Comment