Saviynt unveils its cutting-edge Intelligence Suite products to revolutionize Identity Security!
Click HERE to see how Saviynt Intelligence is transforming the industry.
Saviynt Copilot Icon

MYSQL query to store display name

sppnra
Regular Contributor
Regular Contributor

Hi Saviynt team,

I need help in writing a MySQL query to store lastname and firstname from the below CN value

CP47= CN=Robb\, Raine,OU=EMEA Technology Solutions,OU=Users & Computers,OU=EMEA Headquarters,OU=United Kingdom,OU=Countries,OU=EMEA,DC=eu,DC=corp,DC=local

Desire output= Raine Robb

Kindly help me with this 

3 REPLIES 3

Dhruv_S
Saviynt Employee
Saviynt Employee

Hi @sppnra 

We are working on it and keep you posted.

Regards,

Dhruv Sharma

shivmano
Regular Contributor III
Regular Contributor III

@sppnra please try below query

select concat(substring_index (substring_index(substring_index(customproperty47,',OU',1),'=',-1),',',-1), ' ',substring_index (substring_index(substring_index(customproperty47,',OU',1),'=',-1),',',1)) from users

Dhruv_S
Saviynt Employee
Saviynt Employee

Hi @sppnra 

Could you please try the above and confirm. 

Regards,

Dhruv Sharma