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

SAV File Preprocessor Query

sfinney
New Contributor II
New Contributor II

Hi, I am working on the scenario below.

I want customproperty2 to be equal to customproperty1 at the time of initial user creation. However, when users are updated later on I want customproperty2 to remain unchanged, and only customproperty1 should be updated. 

Here are some of the queries below:

"UPDATE NEWUSERDATA N join currentusers U on N.username=U.username set N.customproperty2 = N.customproperty1 when U.customproperty2 = '' else U.customproperty2 end"
 
"UPDATE NEWUSERDATA N join currentusers U on N.username=U.username IF U.customproperty2 = '' THEN set N.customproperty2=N.customproperty1 ELSE set N.customproperty2=U.customproperty2 END IF"
 
Any tips on query or syntax errors?
Thanks!
sfinney
1 REPLY 1

sfinney
New Contributor II
New Contributor II
I got it to work
 
"UPDATE NEWUSERDATA N join currentusers U on N.username=U.username set N.customproperty2 = N.customproperty1 where U.customproperty2 is null", "UPDATE NEWUSERDATA N join currentusers U on N.username=U.username set N.customproperty2 = U.customproperty2 where U.customproperty2 is not null"