Leaked source code of windows server 2003
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
893 B

  1. -- Script: uddi.v2.trig.sql
  2. -- Author: [email protected]
  3. -- Description: Creates triggers
  4. -- Note: This file is best viewed and edited with a tab width of 2.
  5. -- =============================================
  6. -- Section: UDC_businessEntities
  7. -- =============================================
  8. -- =============================================
  9. -- Name: UDC_businessEntities_delete
  10. -- =============================================
  11. IF EXISTS (SELECT name FROM sysobjects WHERE name = 'UDC_businessEntities_delete' AND type = 'TR')
  12. DROP TRIGGER UDC_businessEntities_delete
  13. GO
  14. CREATE TRIGGER UDC_businessEntities_delete
  15. ON UDC_businessEntities
  16. FOR DELETE
  17. AS
  18. BEGIN
  19. IF (SELECT COUNT(*) FROM [deleted]) > 0
  20. BEGIN
  21. DELETE
  22. [UDC_serviceProjections]
  23. WHERE
  24. ([businessKey] IN (SELECT [businessKey] FROM [deleted]))
  25. END
  26. END -- UDC_businessEntities_delete
  27. GO