Quantcast
Channel: SCN: Message List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 9165

Re: How to Concatenate Column Value from Multiple Rows into a Single Column?

$
0
0

Hello Raghavendra;

 

 

We have special function CE_VERTICAL_UNION   .  it will concatinate the coulmns

 

 

BEGIN

   Q1 = CE_COLUMN_TABLE("SRK"."quotes");

   O1 = CE_COLUMN_TABLE("SRK"."orders");

 

   J1 = CE_JOIN(:Q1, :O1, ["quoteid"], ["quoteid"

                                       ,"quote_name"

                                       ,"product"

                                       ,"total_cost"

                                       ,"orderid"

                                       ,"representative"

                                       ,"order_date"

                                       ,"Order_cost"

                           ]

                );

 

   A1 = CE_AGGREGATION (:J1,[COUNT("quoteid")

                     AS CNT_QID],["product"]);

 

   var_out = CE_VERTICAL_UNION (:J1, ["quote_name"

                                     ,"representative"

                                     ,"Order_cost"],

                                :A1, ["CNT_QID"

                                     ,"product"]

                               ); 

 

 

Also it can use for concatinate 2 coumns value into one column ,, little bit tricky..


Viewing all articles
Browse latest Browse all 9165

Trending Articles