Click HERE to see how Saviynt Intelligence is transforming the industry. |
09/15/2023 05:08 AM
Hi all,
I have been trying to create a rule for the generation of the system username that takes into account the firstname with multiple values, for example:
firstname: Jean Pierre
System Username: Jean
What I am trying to achieve is to find a way to separate these two names to generate the system username, so that the system username is only 'Jean'.
But when I try to test with the following SQL query:
SUBSTRING(users.firstname , CHARINDEX(' ', users.firstname) + 1, LEN(users.firstname ))
I receive the following error: Operation not allowed as you are entering a value that resembles or contains script code
Any help is welcome in order to achieve this.
Thank you
Solved! Go to Solution.
09/15/2023 05:29 AM - edited 09/15/2023 08:07 AM
Hello @Ivan5533,
The SQL query you’re using is trying to get the substring after the first space, which is why you’re getting ‘Pierre’ instead of ‘Jean’. If you want to get the substring before the first space (i.e., the first name), you can modify your query as follows:
SUBSTRING_INDEX(users.firstname, ' ', 1)
or
SUBSTRING(users.firstname, 1, CHARINDEX(' ', users.firstname) - 1)
Thanks,
09/18/2023 02:17 AM - edited 09/18/2023 03:39 AM
Thank you very much for your reply!
I had made a mistake when copying the query, you are right.
I think it was previously failing due the use of the 'LEN()' function, but im not sure.
Is there a list of all SQL functions allowed in EIC?
09/20/2023 11:22 PM
Hello @Ivan5533,
No currently, we dont have the list, We have examples given in the document, you can refer those examples for creating your queries.
Hope Your issue has been resolved or you are still facing the issue?
Thanks,
09/22/2023 12:32 AM
The issue has been solved, thank you @sudeshjaiswal
09/22/2023 12:33 AM
Thanks for the confirmation!