在 SAP HANA 中使用文本连接的示例
要实现文本连接,请创建一个表 −
CREATE COLUMN TABLE TEST.P_INFO (PROD_ID BIGINT, P_CAT NVARCHAR(50)); INSERT INTO TEST.P_INFO VALUES (11,’FURNITURE’); INSERT INTO TEST.P_INFO VALUES (14,’ELECTRONICS’); INSERT INTO TEST.P_INFO VALUES (25,’FURNITURE’); INSERT INTO TEST.P_INFO VALUES (76,’ELECTRONICS’);
第二张表 −
CREATE COLUMN TABLE TEST.PROD_DESC (PROD_ID BIGINT,LANGUAGE NVARCHAR(10), DESCR NVARCHAR(100)); INSERT INTO TEST.PROD_DESC VALUES (11,’E’,’Table’); INSERT INTO TEST.PROD_DESC VALUES (11,’D’,’Chair’); INSERT INTO TEST.PROD_DESC VALUES (14,’E’,’32 LED’); INSERT INTO TEST.PROD_DESC VALUES (14,’D’,’32 inch LCD’); INSERT INTO SAP_STUDENT.PRODUCT_DESC VALUES (25,’E’,’Comp Table’); INSERT INTO SAP_STUDENT.PRODUCT_DESC VALUES (25,’E’,’Mixer’);
请注意,它应该具有“语言”列,该列应具有'E'(英语)和'D'(德语)等单个字母作为值。
广告