Error -2513 Data

Database
Enthusiast

Error -2513 Data

Hi All,

i have an Issue. When i try Insert my Data in to the Target table , iam getting error 2513 which is a Data Row too long error.
The error desc is that THE LENGTH OF THE ROW SPECIFIED BY THE USER IS GREATER THAN SYSMAXROW
My source has about four Varchar Columns . out of which one column is varchar(63000) and rest are varchar (75 ).
initially i thought it could be a ROWMAX Length error. But with a ROWMAX Length error i should not be able to create my table at first place . my table ( TGT ) is getting created with the above Structure.Source has same Structure.But iam not able to insert Records.

please Suggest me a Solution .
Also please suggest me how can i increase the threshold of sysmaxrow.

2 REPLIES
Fan

Re: Error -2513 Data

SELECT    BR_NAME.GU_PRIMARY_NAME,
BR_NAME.SLA_BUSINESS_RULE_CLASS_CD,
TRIM(TRAILING ','
FROM (XMLAGG(TRIM(BR_NAME.SLA_BUSINESS_RULE_NAME)|| ','
ORDER BY BR_NAME.GU_PRIMARY_NAME) (VARCHAR(10000)))) BUSINESS_RULE_NAME
FROM (

SELECT C.GU_PRIMARY_NAME,A.SLA_BUSINESS_RULE_CLASS_CD,A.SLA_BUSINESS_RULE_NAME
FROM GRMTBVDB.BV_CUSTOMER_PARTY_HIERARCHY C
JOIN GRMTBVDB.BV_APSP_SVC_LEVEL_AGREEMENT B
ON C.BRANCH_CUSTOMER_PARTY_KEY=B.END_CUSTOMER_PARTY_KEY
JOIN GRMTBVDB.BV_APSP_SLA_BUSINESS_RULE A
ON A.SRC_LEVEL_AGREEMENT_ID_INT=B.SRC_LEVEL_AGREEMENT_ID_INT
WHERE B.SLA_PHASE_CD IN ('Management')
GROUP BY 1,

2,3) BR_NAME
GROUP BY 1,2

Hi Team, 

I am executing above query but it is failing satying that (2513 A data is too long). Request you to please help me

Thanks

Mohd Faizan

Teradata Employee

Re: Error -2513 Data

What are the data types for C.GU_PRIMARY_NAME,A.SLA_BUSINESS_RULE_CLASS_CD,A.SLA_BUSINESS_RULE_NAME? Are any of them VARCHAR with excessive max length (perhaps much greater than any actual data length)? You may need to CAST/SUBSTRING them to something shorter.

When you GROUP BY a VARCHAR column, the spool row will contain a copy of the value placed in a CHAR column padded to the declared max length.