响应行大小溢出(9804)错误

时间:2016-05-04 12:59:39

标签: teradata

我在teradata 14.0中执行以下查询

        SELECT oreplace(CAST(RULE_ID AS VARCHAR(1000)),' ','') RULE_ID,
        oreplace(CAST(PHASE_ID AS VARCHAR(1000)),' ','') PHASE_ID,
        oreplace(CAST(TARGET_TABLE_NAME AS VARCHAR(1000)),' ','') TARGET_TABLE_NAME,
        oreplace(CAST(AUDIT_TABLE_NAME AS VARCHAR(1000)),' ','') AUDIT_TABLE_NAME,
        oreplace(CAST(PROC_NAME AS VARCHAR(1000)),' ','') PROC_NAME,
        oreplace(CAST(ACTIVE_START_DT AS VARCHAR(1000)),' ','') ACTIVE_START_DT,
        oreplace(CAST(ACTIVE_END_DT AS VARCHAR(1000)),' ','') ACTIVE_END_DT,
        oreplace(CAST(ACTIVE_IND AS VARCHAR(1000)),' ','')  ACTIVE_IND,
        oreplace(CAST(WRITE_AUDIT_IND AS VARCHAR(1000)),' ','') WRITE_AUDIT_IND,
        oreplace(CAST(SCENARIO_TYPE AS VARCHAR(1000)),' ','') SCENARIO_TYPE,
        oreplace(CAST(RULE_ORDER AS VARCHAR(1000)),' ','') RULE_ORDER

        FROM table

当我执行此查询时,收到9804(响应行大小溢出)。

使用的Charaterset:ASCII

1 个答案:

答案 0 :(得分:4)

结果数据类型oReplaceVarChar(8000)您必须CAST函数的结果,而不是参数:

 CAST(oreplace(PROC_NAME,' ','') AS VARCHAR(1000)) AS PROC_NAME,

但为什么要删除所有空格?如果有尾随空格,您只需TRIM