Concatenation in SQL

Index

 

ABAP HANA 7.51: Concatenation

Enhanced ABAP gives another new feature of Concatenation which makes it possible to concatenate multiple selected fields which can be merged with hardcoded strings, spaces or delimiters.

Concatenation in new Open SQL query is achieved with && operator. If any hardcoded string is to be also concatenated, it is enclosed inside single quotes. All Variables, Constants and hardcoded literals are kept inside small brackets “( … )”. As the last syntax action, ‘to be concatenated text’ is given an alias with AS keyword. This will effectively create a field with given alias in the created Internal table.

Refer below Source code Example!

Sample Source Code:

SQL_Concatenation_Var1_source

Output:

The output of above query will create an Internal table with only one field called KEY!

Index

 

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s