04/20/2023 11:40 PM
Hi team,
We have a requirement to get the group for users, but the group which we get from rest api is
"10014113~DLV2000 Construction Crew"
We need to get the value after the character '~'.
we have written below inline preprocessor query, but this does not work.
Could you please let us know what to use to get this substring.
"UPDATE NEWUSERDATA LEFT JOIN CURRENTUSERS ON NEWUSERDATA.USERNAME = CURRENTUSERS.USERNAME SET NEWUSERDATA.customproperty54 = substring(CURRENTUSERS.customproperty11,CHARINDEX('~',CURRENTUSERS.customproperty11) + LEN('~'), LEN(CURRENTUSERS.customproperty11))
Solved! Go to Solution.
04/21/2023 01:21 AM
Please use SUBSTRING_INDEX("10014113~DLV2000 Construction Crew", "~", -1)
04/21/2023 01:51 AM
Hello @JasmeenB
You May try to use this query to achieve this,
"UPDATE NEWUSERDATA LEFT JOIN CURRENTUSERS ON NEWUSERDATA.USERNAME = CURRENTUSERS.USERNAME SET NEWUSERDATA.customproperty54 = SUBSTRING_INDEX(CURRENTUSERS.customproperty11,'~',-1)"
Thanks