Skip to Content
0
Jan 19, 2019 at 10:46 AM

How to increment number part of string in SAP hana sql

1409 Views Last edit Jan 19, 2019 at 10:48 AM 2 rev

I am working on one requirement where I need to take the maximum value of a column with string data type and increment by one everytime when there is a new entry in table.

For example.

Abc_current_date_5...

This should be incremented to Abc_current_date_6

The number part should be fetched from the table everytime and should be incremented by 1

How can we achieve this ?