Quantcast
Channel: SCN: Message List
Viewing all articles
Browse latest Browse all 9269

Concatenate 2 different fields into 1 field separated by space

$
0
0

Hi folks,

I'm new in HANA and have a question that puzzled me for quite some time.

I have a HANA stored procedure which concatenate 2 different fields into 1 field and need to separate by space.

For instance, concatenate first name and last name, then separated by space.

 

Syntax:

SELECT "VORNA" || ' ' || "NACHN" AS "ENAME" FROM <tablename>;

 

Preview Result in HANA Studio:

NAME1 NAME2 (as expected, which is separated by space)

 

After that, I want to consume this HANA stored procedure in ABAP by using native SQL.

The result returned to ABAP ignored the space in concatenation, which results in NAME1NAME2 (which is not as expected).

 

Field attribute in HANA: VARCHAR/NVARCHAR

Field attribute in ABAP: CHAR

 

Any idea what happen or how to overcome this issue ?

Appreciate any valuable input.

Thanks.

 

Regards,

KS


Viewing all articles
Browse latest Browse all 9269

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>