1. 程式人生 > >SAP HANA SQL字串連線操作

SAP HANA SQL字串連線操作

把多個字串連線起來,在HANA SQL裡這樣寫

關鍵字:concat

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;
再比如:
insert into TEST_TABLE values ('STR1'||'STR2');
可以使用關鍵字來代替
concat('STR1','STR2')