This is how my table is declared.
EXEC SQL DECLARE DB2PRD.THIST_ESTAT_MOVTO TABLE
( CPSSOA_JURID DECIMAL(10, 0) NOT NULL,
NSEQ_UND_ORGNZ DECIMAL(8, 0) NOT NULL,
CPRODT_SERVC_OPER DECIMAL(8, 0) NOT NULL,
HINCL_HIST TIMESTAMP NOT NULL,
CPTCAO_TBELA DECIMAL(2, 0),
QMOVTO_OPER_APLIC DECIMAL(8, 0),
VMOVTO_OPER_APLIC DECIMAL(17, 2),
PMED_TX_OPER DECIMAL(7, 4),
TMED_CURVA_DEP DECIMAL(5, 0),
QMOVTO_OPER_RESGT DECIMAL(8, 0),
VMOVTO_OPER_RESGT DECIMAL(17, 2),
QMOVTO_BAIXA_RESGT DECIMAL(8, 0),
VMOVTO_BAIXA_RESGT DECIMAL(17, 2),
QMOVTO_PGTO_RESGT DECIMAL(8, 0),
VMOVTO_PGTO_RESGT DECIMAL(17, 2),
HATULZ_ESTAT_MOVTO TIMESTAMP NOT NULL
) END-EXEC.
( CPSSOA_JURID DECIMAL(10, 0) NOT NULL,
NSEQ_UND_ORGNZ DECIMAL(8, 0) NOT NULL,
CPRODT_SERVC_OPER DECIMAL(8, 0) NOT NULL,
HINCL_HIST TIMESTAMP NOT NULL,
CPTCAO_TBELA DECIMAL(2, 0),
QMOVTO_OPER_APLIC DECIMAL(8, 0),
VMOVTO_OPER_APLIC DECIMAL(17, 2),
PMED_TX_OPER DECIMAL(7, 4),
TMED_CURVA_DEP DECIMAL(5, 0),
QMOVTO_OPER_RESGT DECIMAL(8, 0),
VMOVTO_OPER_RESGT DECIMAL(17, 2),
QMOVTO_BAIXA_RESGT DECIMAL(8, 0),
VMOVTO_BAIXA_RESGT DECIMAL(17, 2),
QMOVTO_PGTO_RESGT DECIMAL(8, 0),
VMOVTO_PGTO_RESGT DECIMAL(17, 2),
HATULZ_ESTAT_MOVTO TIMESTAMP NOT NULL
) END-EXEC.
It is using the field CPTCAO_TBELA as its partitioning field, as follow below in the create of the table.
PARTITION BY ( CPTCAO_TBELA)
(
PARTITION 1 ENDING AT (9),
PARTITION 2 ENDING AT (19),
PARTITION 3 ENDING AT (29),
PARTITION 4 ENDING AT (39),
PARTITION 5 ENDING AT (49),
PARTITION 6 ENDING AT (59),
PARTITION 7 ENDING AT (69),
PARTITION 8 ENDING AT (79),
PARTITION 9 ENDING AT (89),
PARTITION 10 ENDING AT (99)
)
(
PARTITION 1 ENDING AT (9),
PARTITION 2 ENDING AT (19),
PARTITION 3 ENDING AT (29),
PARTITION 4 ENDING AT (39),
PARTITION 5 ENDING AT (49),
PARTITION 6 ENDING AT (59),
PARTITION 7 ENDING AT (69),
PARTITION 8 ENDING AT (79),
PARTITION 9 ENDING AT (89),
PARTITION 10 ENDING AT (99)
)
Now here is my problem, since the partitions go from 0 to 99, and my field is declared as DECIMAL (2, 0), i believe it should accept any value between this range, since i am not even allowed to insert a value bigger than 99, am I right?
The problem is, no matter which value i try to insert in this field, i get a -327 SQLCODE.
I have no idea, why this is happening, can anyone help me out?
Thanks in Advance
Code'd