Concatenate two columns in HANA database

dush88c picture dush88c · Oct 9, 2015 · Viewed 28.7k times · Source

Please give me an advice to convert below MSSQL VIEW to HANA VIEW

CREATE VIEW [dbo].[ViewSample]
AS
SELECT [column1] + ' / ' + [cloumn2] AS CollectionLabel
FROM [dbo].[T1] T1
CROSS JOIN [dbo].[T2] T2

Thanks in advance

Answer

Goldfishslayer picture Goldfishslayer · Oct 9, 2015

There is also a concat operator which allows you to do that (||)

CREATE VIEW "dbo"."ViewSample"
    AS
    SELECT "column1" || ' / ' || "cloumn2" AS CollectionLabel
    FROM "dbo"."T1" T1
    CROSS JOIN "dbo"."T2" T2