Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
osirisa
Constraint Violating Yak Guru
289 Posts |
Posted - 2011-09-14 : 16:43:04
|
| ------Insert the Records inside T2 to keep track of records deleted---------IF EXISTS (SELECT * FRom PMO_IA_Tasks Where ia_task_assignee is not Null)BeginINSERT INTO [PMO_IA_Forum](Project,Comments, created, created_by )SELECT Project, ia_task_assignee + '' + 'Employee is not longer in the company', GETDATE(), 'Auto Generate by System'FROM #TP_AuditTask_vs_ldap update aset a.ia_task_assignee = ''FROM ITPM.dbo.PMO_IA_Tasks a INNER JOIN #TP_AuditTask_vs_ldap b on a.Project = b.Project And a.ia_task_assignee = b.ia_task_assigneeEnd*The Insert statement is not working it continue to insert every time the stored procedure is executed.Thanks, |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|
|