SAP HANA 中 Text join 的使用方法示例
要实现 Text join,创建一个表 −
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”等。
广告