SQL middle name update
Budget: $30 – $250 USD
The pivot table was just to showcase what a new table would need to look like. If you filtering on one content ID, this will only bring back one employee.
UPDATE U
set U.middle_name=[541]
from usr_staging
join (select content_id,field_id,field_value from tbllVTextData where content_id = '472073' as source_table
PIVOT (Max(field_value) for field_id in ([23701],[541])) as piviot_table;",
Possible Solution
Before creating usr_staging table in the AAD sync job develop a SQL query that will dump employee ID and Middle Name from table tblIVTextData in the following format. You can run a pivot table in SQL to help provide an idea on how the table should look.
o
Employee ID | Middle Name
Once you have table created you can then develop SQL to set the middle name in the user profile, by comparing the user_username in the tbluser and new table that will hold Employee ID|Middle Name.
UPDATE U
set U.middle_name=[541]
from usr_staging
join (select content_id,field_id,field_value from tbllVTextData where content_id = '472073' as source_table
PIVOT (Max(field_value) for field_id in ([23701],[541])) as piviot_table;",
Possible Solution
Before creating usr_staging table in the AAD sync job develop a SQL query that will dump employee ID and Middle Name from table tblIVTextData in the following format. You can run a pivot table in SQL to help provide an idea on how the table should look.
o
Employee ID | Middle Name
Once you have table created you can then develop SQL to set the middle name in the user profile, by comparing the user_username in the tbluser and new table that will hold Employee ID|Middle Name.