cancel
Showing results for 
Search instead for 
Did you mean: 

CONVERT_CURRENCY IN SELECT NOT EXECUTING

Srisap
Participant
0 Kudos

I am trying to execute the following query.


select productid, category,

  CONVERT_CURRENCY("AMOUNT"=> price,

  "SOURCE_UNIT_COLUMN"=> currency,

  "SCHEMA" => 'SAP_HANA_DEMO',

  "TARGET_UNIT_COLUMN"=> currency,

  "REFERENCE_DATE"=> '2013-09-23',

  "CLIENT"=>'000'

  ) as "afterconver"

from "SAP_HANA_DEMO"."sap.hana.democontent.epm.data::EPM.MasterData.Products";

I am getting the below error.


SAP DBTech JDBC: [2048]: column store error: # required attributes: 5, # attributes in itab: 5, requested column index: 5 at function __copy_trex_field_NString__() 

Appreciate all the help.

Thanks.

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi,

Do you really want the SOURCE_UNIT_COLUMN same as the TARGET_UNIT_COLUMN? One does not get the error you report if they are different or if you specify one as a constant using SOURCE_UNIT or TARGET_UNIT.

Regards,

Dinu

Srisap
Participant
0 Kudos

Didn't mean to use the same column ( practically it should be diff )but the use of TARGET_UNIT solved it. Thanks.

Answers (0)