Skip to Content

Concat string columns – SAP HANA

Hi,

 

do you need to concat string columns in SAP HANA?

 

Try something like this:

 

create procedure concat_me (out itens nvarchar(200))

as begin

 

declare cursor C for SELECT OITM.”ItemName” from OITM;

 

itens := ”;

 

for R as C do

itens := :itens || R.”ItemName” || char(13) || ”;

end for;

 

select :itens as “Itens” from dummy;

 

end;

 

then you can use this procedure to take the result of the concat.

 

If it does not work or you need help, write me!

Be the first to leave a comment
You must be Logged on to comment or reply to a post.