Quantcast
Channel: SCN : Discussion List - SAP HANA Developer Center
Viewing all articles
Browse latest Browse all 6412

SPLT FUNCTION IN HANA SQL

$
0
0

I am trying to find a SPLIT Function to split a String based on the de limiter  "SPACE" . The data is coming from VBAP and a CDS view.

Its the VC Configuration Data. For each Sales order Item we have several Material Characteristics. In the below example each item has two different

characteristic data. I am using STRING_AGG to combine the characteristic data into one Single line. While performing  STRING_AGG I also need to

split each characteristic data based on the de limiter  "SPACE.

 

Example:  After applying SPLIT function on the below string:

'CLA001013002: 60Hz'; the output should be '60Hz'

 

 

Current Output

VBELN_ID             POSNR         MATNR              CHARACTERISTICS

320909646            010200          HE_CLINAC       CLA001013002: 60Hz,CLH001001000 2100C
320909646            030200          HE_CLINAC       CLH001001000 2100C,CLA001013002: 60Hz

 

 

Desired  Output

VBELN_ID             POSNR         MATNR              CHARACTERISTICS

320909646            010200          HE_CLINAC       60Hz,2100C
320909646            030200          HE_CLINAC       2100C,60Hz

 

 

 

 

Appreciate if anyone came across this scenario.


Viewing all articles
Browse latest Browse all 6412

Trending Articles



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