gmoff01

Untitled

Jun 10th, 2015
264
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
SQL 0.85 KB | None | 0 0
  1. USE [Viewpoint]
  2. GO
  3.  
  4. ALTER TABLE [dbo].[vSMAgreementService]  WITH CHECK ADD  CONSTRAINT [CK_vSMAgreementService_Pricing]
  5. CHECK  ((([PricingMethod]='T' OR [PricingMethod]='P' OR [PricingMethod]='I')
  6. AND CASE [PricingMethod]
  7.         WHEN 'I' THEN checksum((0),(0),(0),(0))
  8.         WHEN 'P' THEN checksum(~[dbo].[vfEqualsNull]([PricingFrequency]),(1),(0),(1))
  9.         WHEN 'T' THEN checksum((0),~[dbo].[vfEqualsNull]([PricingTermPrice]),
  10.             CASE WHEN [PricingRateTemplate] IS NULL THEN [dbo].[vfEqualsNull]([PricingTermPrice]) ELSE ~[dbo].[vfEqualsNull]([PricingRateTemplate]) END,(0))
  11.     END
  12.     =checksum(~[dbo].[vfEqualsNull]([PricingFrequency]),~[dbo].[vfEqualsNull]([PricingTermPrice]),~[dbo].[vfEqualsNull]([PricingRateTemplate]),~[dbo].[vfEqualsNull]([BilledSeparately]))))
  13. GO
  14.  
  15. ALTER TABLE [dbo].[vSMAgreementService] CHECK CONSTRAINT [CK_vSMAgreementService_Pricing]
  16. GO
Advertisement
Add Comment
Please, Sign In to add comment