cancel
Showing results for 
Search instead for 
Did you mean: 

Concatenate with a Space inbetween datasphere

fraita
Explorer
0 Kudos

Hi,

I want to use this formula:

CONCAT(LIFNR,NAME1)

But I want to have a space between those too, because right now it becomes "LIFNRNAME1" but I would instead like to have "LIFNR NAME1".

I've tried with
CONCAT(LIFNR," ",NAME1)
CONCAT(LIFNR,"",NAME1)
CONCAT(LIFNR,'',NAME1)
CONCAT(LIFNR,' ',NAME1)

Thanks
MKreitlein
Active Contributor
0 Kudos

Hello Martin,

the way you tried it would work like this: CONCAT(LFINR, CONCAT(' ', NAME1))

Wondering why HANA uses || instead of && (like VBA or ABAP)???

BR, Martin

XaviPolo
Active Contributor
0 Kudos

'||' is the SQL concat operator and it is supported by many databases and other systems.

'&&' is the bitwise AND operator, but it is not supported in HANA where it's implemented as a BITAND() function

Regads,

Accepted Solutions (1)

Accepted Solutions (1)

Simon_Ye
Employee
Employee
0 Kudos

Hi Martin,

DSP purely use the built-in function and operator of HANA, just try this:

LIFNR || ' ' || NAME1

Regards,

Simon

fraita
Explorer
0 Kudos

Hi Simon,

Thank you so much, it worked perfectly!

One question for future reference, what "coding language" is Datasphere Model View calculated columns based on?
I often try to use ChatGPT to solve this, but it doesn't have data for this kind of solutions and always have to turn my questions to here.

I modified the code a little. To make it look better in visualisation part.

LIFNR || ' | ' || NAME1

Answers (1)

Answers (1)

Simon_Ye
Employee
Employee
0 Kudos