Discussion:
Fetch 1000 records in a cursor
(too old to reply)
a***@fiserv.com
2007-10-22 18:14:38 UTC
Permalink
Hi experts,

I have a join query in cursor contaning large amount of data.
I want to process in the batch of 1000 using a cursor.

I have already written a normal cursor which is giving me the error as

A database manager error occurred.[IBM][CLI Driver][DB2/NT] SQL0304N A value cannot be assigned to a host variable because the value is not within the range of the host variable's data type. SQLSTATE=22003

DECLARE C1
FETCH
INTO
<VARNAME>
CLOSE C1

Please let me know how to handle this issue.

Thanks in Advance


Ajay M
Ian
2007-10-22 20:58:07 UTC
Permalink
Post by a***@fiserv.com
Hi experts,
I have a join query in cursor contaning large amount of data.
I want to process in the batch of 1000 using a cursor.
I have already written a normal cursor which is giving me the error as
A database manager error occurred.[IBM][CLI Driver][DB2/NT] SQL0304N A value cannot be assigned to a host variable because the value is not within the range of the host variable's data type. SQLSTATE=22003
DECLARE C1
FETCH
INTO
<VARNAME>
CLOSE C1
Please let me know how to handle this issue.
Make sure that the variable <VARNAME> has a type that's consistent with
what your cursor is returning.

Continue reading on narkive:
Loading...