call DYNAPROCTEST(' carrierdrid, planid, id ', '20','30','N')@

--stored proc definition
CREATE PROCEDURE DYNAPROCTEST(IN P_SELECT_FIELDS VARCHAR(50), IN begin1 varchar(5), IN end1 varchar(5), IN CreateTable char(1) )

--V_SQL too lage???
SET V_SQL = 'SELECT * from ( select ' || P_SELECT_FIELDS || ' ,row_number() over() as RN from Tbl_group) as yy where RN between ' || begin1 || ' and ' || end1 ;

--This is error message
SQL0433N Value "SELECT * from ( select carrierdrid, planid, id
,row_number " is too long.


The value "<value>" required truncation by a system (built-in)
cast or adjustment function, which was called to transform the
value in some way. The truncation is not allowed where this
value is used.

The value being transformed is one of the following:

o an argument to a user defined function (UDF)

o an input to the SET clause of an UPDATE statement

o a value being INSERTed into a table

o an input to a cast or adjustment function in some other

o a recursively referenced column whose data type and length is
determined by the initialization part of recursion and may
grow in the iterative part of the recursion.

Where am I going wrong?