0

Try to find way to add rows to table type that not empty without removing content.

CREATE TYPE "TPU"."TYP_ACTION" AS TABLE 
("ID" BIGINT CS_FIXED, 
"NAME" NVARCHAR(255) CS_STRING)

declare actions "TPU"."TYP_ACTION";

The only way i found is:

actions=select 1 as id, null as name from dummy;

But in this case the previous content of actions will be removed.

adelak
  • 647
  • 4
  • 11
  • 25

1 Answers1

1

The answer here is: you cannot insert data into a table type.

What you can do - and demonstrated - is to assign data to a table variable that conforms to the type.

As of HANA 2 SPS 01 additional options to change "table variable" data had been added. Now, the table variables can be used in INSERT,UPDATE and DELETE statements. See SAP HANA documentation: Modifying the Content of Table Variables for details on that.

Lars Br.
  • 9,949
  • 2
  • 15
  • 29