4 weeks ago
Hello guys,
I'm in trouble with LOCATE function returning data on HANA Database (HANA v. 2.00.059.09...).
This is the query a run:
SELECT T0.U_ALD_VARIANTI
,LOCATE(T0.U_ALD_VARIANTI,'=') AS POS
,LOCATE(T0.U_ALD_VARIANTI,'=',-1) AS POSX
,LOCATE(T0.U_ALD_VARIANTI,'=',-2) AS POSY
FROM OITM T0 WHERE t0."ItemCode"='DISCOFERRO2A$CL.1_Fg.II75DIAM60'
And the scope is to find position of the first and second char '=' in the string 'CLRIF=CL.1;CLFIG=_Fg.II75;TGSEG=DIAM60'.
The positions are 6, 17 and 32 but as you can see in the image below, for second '=' in position 17 the function doesn't return me the correct position.
I believe that may be because of the underscore ( '_' ) in the string; probably LOCATE function use a search LIKE in the string.
Please, have you any suggestion or there is another function instead of LOCATE for obtaining the same find result?
Thank you in advance!
Request clarification before answering.
User | Count |
---|---|
23 | |
21 | |
8 | |
5 | |
5 | |
4 | |
4 | |
3 | |
3 | |
3 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.