查询以拆分SAP中的分隔字符串hana

时间:2017-03-23 12:20:12

标签: sap hana

我们要求sap HANA将逗号分隔的字符串拆分为行 -

string - A,B

我们想要输出as-

col1 
A
B

是否可以使用SAP HANA?

最好的问候

1 个答案:

答案 0 :(得分:0)

您可以尝试遵循SQLScript library to split text into table表格

do
begin using SQLSCRIPT_STRING as lib;

declare tbl table (result varchar(10));
declare strVal varchar(200);
strVal = 'A,B';
tbl := lib:split_to_table( :strVal, ',' );

select result as col1 from :tbl;

end;
相关问题