Skip to Content

Triying Transpose Rows in Columns

Hi Experts.

This query in SAP HANA:

select T0."U_ChklInstance", 
MIN(case when T0."U_ElementId" = 'numberinput1' then T0."U_Value" end) as "SKU",
MIN(case when T0."U_ElementId" = 'numberinput2' then T0."U_Value" end) as "SKUwo" 
from "@COR_CHCKL_INST_ELM" AS T0
group by T0."U_ChklInstance"

Show this error:


  • 1). [SAP AG][LIBODBCHDB32 DLL][HDBODBC32] General error;264 invalid datatype: LOB Type in aggregation func: line 3 col 11 '' (SWEI) (at pos

Help me please.

Thank you!

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Apr 11, 2017 at 11:34 PM

    You might want to consult the SAP HANA documentation on what operations work on LOB columns.

    https://help.sap.com/viewer/4fe29514fd584807ac9f2a04f6754767/2.0.00/en-US/20a1569875191014b507cf392724b7eb.html#loio20a1569875191014b507cf392724b7eb___csql_data_types_1sql_data_types_introduction_lob

    The statement seems to use a LOB column in the MIN() aggregation.

    Also, the case statements have no explicitly defined behaviour for when the condition is not met; this can leave to confusion about what will be returned.

    Add comment
    10|10000 characters needed characters exceeded

  • Apr 12, 2017 at 02:31 PM

    Looking at what you sent me, I put a CAST in one of the fields and it worked. Thank you very much for the help.

    Add comment
    10|10000 characters needed characters exceeded