Welcome to The Community. The community is designed to share information on SAP HANA in an interactive way.

Visit SAPHANATutorial.Com
OCCURRENCES_REGEXPR does not work with pipe char
  • Hi@all,

    this is my script:

    SELECT OCCURRENCES_REGEXPR('|' IN 'MCL | Bosch') "occurrences_regexpr" FROM DUMMY;

    and I get always 12 as output but 1 is correct.

    Could it be that HANA can't count / search for some special chars ?

  • Hi Holger,
    "|" is a special character. You just need to escape it. 

    Try this.
    SELECT OCCURRENCES_REGEXPR('\|' IN 'MCL | Bosch') "occurrences_regexpr" FROM DUMMY;


Howdy, Stranger!

It looks like you're new here. Sign In using your Gmail ID, Click on 'Google' button to sign in

Free Online Training Programs under SAPHANATutorial.com:
Click here to start SAP HANA Basics online course.
© 2016 : saphanatutorial.com, All rights reserved.
Visit SAPHANATutorial.Com