FETCH ABSOLUTEit's throwing for the host variable and saying "variable should be zero scale." I had declared the variable as an INTEGER, and I even tried it with DECIMAL(n,0), but I get the same error.
FROM INTO ;
Well, it sounds like your query should work. When a host variable is used with the ABSOLUTE form of the FETCH with scrollable cursors, the host variable must be an exact numeric type with zero scale and must not include an indicator variable. Did you include an indicator variable? (Probably not, but I had to ask.)
The possible data types for the host variable are DECIMAL(n,0) or INTEGER. The DECIMAL data type is limited to DECIMAL(18,0). Try substituting an integer constant in the stored procedure just to see if that works. If it does, try the integer variable again. If you continue to get the same problem I suggest that you post this problem with IBM technical support - it could be a bug.
Dig Deeper on IBM DB2 management
Related Q&A from Craig S. Mullins
Our expert suggests that the best way to pass the SAP BW exam is to have hands-on job experience. But that's not all he has to say about ... Continue Reading
To export data from a DB2 table to a flat file, you need to run an export specifying the proper file format. The export utility exports data from a ... Continue Reading
Craig Mullins recommends two specific resources for learning how to create and support Binary Large Objects (BLOB) in DB2. Continue Reading
Have a question for an expert?
Please add a title for your question
Get answers from a TechTarget expert on whatever's puzzling you.