ALTER FUNCTION [dbo].[PXQ7050_UDF]
(
@AsOfMonth AS VARCHAR(2)
,@AsOfYear AS VARCHAR(4)
,@GblOptState VARCHAR(4)
)
RETURNS TABLE
AS
RETURN
SELECT DISTINCT
[Claim]
,[Claimant]
,[Insured]
,[Risk Name]
,[Indemnity Reserves]
,[Policy Eff Date]
FROM ( SELECT LossRun.Claim
,LossRun.Claimant
,LossRun.Insured
,LossRun.Risk AS [Risk Name]
,LossRun.[Indem Reserve] AS [Indemnity Reserves]
,LossRun.PolEffDate AS [Policy Eff Date]
FROM dbo.PXQ7000_UDF(@AsOfMonth, @AsOfYear, NULL, 0, 0, 0,
@GblOptState) LossRun
) DTL
WHERE [Policy Eff Date] <= 07 / 01 / 2010
AND [Indemnity Reserves] >= 300000.00
|