The function LOCATE(, , []) in HANA via JDBC returns me only the first encountered character from the argument of the function, though I specified different nth times in the argument (see screenshot).
Screenshot from DBeaver
Example:
String: ‘AAAAA|BBBBB|CCCCC|DDDDD|EEEEE’
The ‘|’ or CHAR(124) character, also known as a pipe, occurs 4 times in this string.
1st Pipe is at position: 6
2nd Pipe is at position: 12
3rd Pipe is at position: 18
4th Pipe is at position: 24
The description of the function can be found here: https://help.sap.com/docs/SAP_HANA_PLATFORM/4fe29514fd584807ac9f2a04f6754767/20e3b6b77519101485e6bd62f7018f75.html
How I would understand it the argument should return the respective nth element that was specified.
Does anyone have an idea what I am doing wrong?
Thanks in advance and have a nice day!
Jan Eh is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.