The ARRAY function returns an array whose elements are specied in the list <array_variable_name>. For
more information see the chapter Array Variables [page 201].
<array_function> = ARRAY_AGG ( :<table_variable>.<column_name> [ ORDER BY
<sort_spec_list> ] )
| CARDINALITY ( :<array_variable_name>)
| TRIM_ARRAY ( :<array_variable_name> ,
<array_variable_name>)
| ARRAY ( <array_variable_name_list> )
<table_variable> ::= <identifier>
<column_name> ::= <identifier>
<array_variable_name> ::= <identifier>
● Assignment of values to a list of variables with only one function evaluation. For example,
<function_expression> must be a scalar user-dened function and the number of elements in
<var_name_list> must be equal to the number of output parameters of the scalar user-dened function.
<proc_multi_assign> ::= (<var_name_list>) = <function_expression>
<proc_single_assign> ::= <variable_name> = <subquery>
| <variable_name> = <proc_ce_call>
| <variable_name> = <proc_apply_filter>
| <variable_name> = <unnest_function>
| <variable_name> = <map_merge_op>
● The MAP_MERGE operator is used to apply each row of the input table to the mapper function and unite all
intermediate result tables. For more information, see Map Merge Operator [page 101].
<map_merge_op> ::= MAP_MERGE(<table_or_table_variable>,
<mapper_identifier>(<table_or_table_variable>.<column_name> [ {,
<table_or_table_variable>.<column_name>} … ] [, <param_list>])
<table_or_table_variable> ::= <table_variable_name> | <identifier>
<table_variable_name> ::= <identifier>
<mapper_identifier> ::= <identifier>
<column_name> ::= <identifier>
<param_list> ::= <param> [{, <param>} …]
<paramter> = <table_or_table_variable> | <string_literal> | <numeric_literal>
| <identifier>
● For more information about the CE operators, see Calculation Engine Plan Operators [page 216].
<proc_ce_call> ::= TRACE ( <variable_name> ) ;
| CE_LEFT_OUTER_JOIN ( <table_variable> ,
<table_variable> , '[' <expr_alias_comma_list> ']' [ <expr_alias_vector>] ) ;
| CE_RIGHT_OUTER_JOIN ( <table_variable> ,
<table_variable> , '[' <expr_alias_comma_list> ']' [ <expr_alias_vector>] ) ;
| CE_FULL_OUTER_JOIN ( <table_variable> ,
<table_variable> , '[' <expr_alias_comma_list> ']' [ <expr_alias_vector>] );
| CE_JOIN ( <table_variable> , <table_variable> , '['
<expr_alias_comma_list> ']' [<expr_alias_vector>] ) ;
| CE_UNION_ALL ( <table_variable> , <table_variable> ) ;
| CE_COLUMN_TABLE ( <table_name> [ <expr_alias_vector>] ) ;
| CE_JOIN_VIEW ( <table_name> [ <expr_alias_vector>] ) ;
| CE_CALC_VIEW ( <table_name> [ <expr_alias_vector>] ) ;
| CE_OLAP_VIEW ( <table_name> [ <expr_alias_vector>] ) ;
| CE_PROJECTION ( <table_variable> , '['
<expr_alias_comma_list> ']' <opt_str_const> ) ;
| CE_PROJECTION ( <table_variable> <opt_str_const> ) ;
| CE_AGGREGATION ( <table_variable> , '['
<agg_alias_comma_list> ']' [ <expr_alias_vector>] );
| CE_CONVERSION ( <table_variable> , '['
<proc_key_value_pair_comma_list> ']' [ <expr_alias_vector>] ) ;
| CE_VERTICAL_UNION ( <table_variable> , '['
<expr_alias_comma_list> ']' <vertical_union_param_pair_list> ) ;
24
PUBLIC
SAP HANA SQLScript Reference for SAP HANA Platform
Logic Container