on 08-18-2015 8:42 AM
Hi,
I have to write a procedure which takes string as an input and checks whether the corresponding string has any special characters or not
after browsing through the HANA docs, I could find out a method LOCATE, which searches for given character
Is there a easy way to do this for example using the REGEX to find out the special characters?
are you looking something like this:
select SUBSTR_REGEXPR ('is' in 'This is a Test') from dummy;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This message was moderated.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Please... even for SAP employees the "search-first-then-ask" rule applies here on SCN.
The RegEx-capabilities are explained in the product documentation.
Just open the build-in help (F1 key) in SAP HANA studio and look for REGEX.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Lars,
I have searched through HANA Studio and HANA Developer Guide as well from this link
http://help.sap.com/hana/sap_hana_developer_guide_en.pdf
Unfortunately I could only find REGEX in javascript but not for HANA SQLSCRIPT, Kindly let me know if I have not searched properly
*sigh*
Also have you tried using replace function in your procedure?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you please example of one input string with special characters with output expected?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
87 | |
10 | |
10 | |
10 | |
7 | |
6 | |
6 | |
5 | |
5 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.