Subject Here's my code to move data from horizontal file to vertical ( and error )
Author Robbie
SET TERM ^ ;

RECREATE PROCEDURE MOVE_FEATURES
AS
DECLARE VARIABLE mycounter integer;
DECLARE VARIABLE FieldStr1 char(21);
DECLARE VARIABLE FieldStr2 char(23);

BEGIN

Insert Into vinfeatvert ( vinfeatvert.VINID, vinfeatvert.FeatureID) SELECT vinfeat.VINID, vinfeat.FEATUREBYTES FROM vinfeat Where vinfeat.FEATUREBYTES >= 1;
FieldStr1 = 'vinfeat.FEATUREBYTES_';
mycounter = 30;

While (mycounter < 31) DO
BEGIN
FieldStr2 = :FieldStr1 || cast ( mycounter as char );
Insert Into vinfeatvert ( vinfeatvert.VINID, vinfeatvert.FeatureID) SELECT vinfeat.VINID, :FieldStr2 FROM vinfeat Where :FieldStr2 >= 1;
Insert Into delthis values (:FieldStr2);
End
END^

SET TERM ; ^

*******************
And below is the error I'm getting
*******************

Engine Error (code = 335544334):
conversion error from string "30".
At procedure 'MOVE_FEATURES' line: 15, col: 3.

SQL Error (code = -413):
Overflow occurred during data type conversion.