Skip to Content
0
Feb 16, 2016 at 11:22 AM

Get column store error: error occurs during bulk insertion when call procedure

80 Views

Hi,

I created a procedure: ( only some code as example )

DROP PROCEDURE SB_TBL_BK230040_PI_WERTE_FILL;

CREATE PROCEDURE SB_TBL_BK230040_PI_WERTE_FILL ( IN I_GJAHR DECIMAL(4,0), IN I_PALEDGER NVARCHAR(2) )
LANGUAGE SQLSCRIPT AS
BEGIN

DECLARE V_JAHR0 DECIMAL(4,0) = :I_GJAHR;
DECLARE V_PALEDGER NVARCHAR(2) = :I_PALEDGER;
DECLARE V_HZDAT DATE = CURRENT_DATE;


DELETE FROM SB_TBL_BK230040_PI_WERTE WHERE JAHR0 = V_JAHR0 AND PALEDGER = V_PALEDGER;
COMMIT;


INSERT INTO SB_TBL_BK230040_PI_WERTE  
select (  150 colums ).....
from
          ( select (  150 colums from table 1
            union all
            select (  150 colums from table 2 )

......
            group by....;

COMMIT;            
END

When I start this procedure I get an error

SAP Hana Database Error: column store error: "SB_TBL_BK230040_PI_WERTE_FILL": line 16 col 1 (at pos 406): [2048] (range 3): column store error: error occurs during bulk insertion

When I run the Insert up to Commit statement as seperat script it works

When I run the procedure without union all ( only values from table 1 ) it works

When I run the procedure without union all ( only values from table 2 ) it works


I have no idea why this procedure does not work.


Holger