HANA数据库语法

  • 相同行合并,不同行“,”分隔

SELECT
	"MATNR",
	--物料号
	STRING_AGG ("WERKS", ',') AS "WERKS",
	STRING_AGG ("ZZSYSTEM", ',') AS "ZZSYSTEM",
	STRING_AGG ("ZZNCCM", ',') AS "ZZNCCM",
	"ATWRT02",
	"ATWRT01"
FROM
	"_SYS_BIC"."BDP_DM.MM.SAM/CAL_BASE_MM_REP_622_LIST"('PLACEHOLDER' = ('$$ip_werks_char$$',
	 '5010,5020,5030,5040,5080,5060,5090,5050'))
WHERE
	"MATNR" = '000000001100020525'
GROUP BY
	"MATNR",
	--物料号
	"ATWRT02",
	"ATWRT01"

HANA数据库语法_第1张图片

  • map函数使用

HANA数据库语法_第2张图片

你可能感兴趣的:(SAP,HANA)