We are using SAP HANA 1.0 SPS 12. AS SAP HANA does not have INTICAP function like oracle, I am trying to realize the same through REGEXP_REPLACE.
Basically I want first letter of each string as UPPER CASE.
In oracle it is possible as -
select initcap('abc') from dual ---- Output -'Abc'
In SAP HANA I am trying -
SELECT REPLACE_REGEXPR('([[:alnum:]]{1})([[:alnum:]])' IN 'abc' WITH 'upper(\1)\2') "replace_regexpr" FROM DUMMY;
But this is not working? Is it possible to realize this with REGEXP_REPLACE?
Select CONCAT(upper(substring(col1,1,1)),substring(col1,2,length(col1)-1)) from
yourTable
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.