Wednesday, June 25, 2014

DataBase

*******************************************SP*****************************
USE [TPAManager_be]
GO

ALTER Procedure [dbo].[pr_FiduciaryK_GetInvestmentGroupNameByProductId]
(
@ProductId as int,
@PortfolioLineup as varchar(100) = null,
@CoreStrategy as varchar(100) = null,
@AdvisorCompensation as varchar(100) = null
)
AS
If @PortfolioLineup = 'All'
Begin
SET @PortfolioLineup = null
End

If @CoreStrategy = 'All'
Begin
SET @CoreStrategy = null
End

If @AdvisorCompensation = 'All'
Begin
SET @AdvisorCompensation = null
End

SELECT     IG.GroupID, IG.GroupName, IG.Description, IG.CoreStrategy, IG.PortfolioLineup, IG.AdvisorCompensation
, IG.FiduciaryKQuestionnaireFile
FROM         tblInvestmentGroup AS IG INNER JOIN
                      FiduciaryK_ProductFundList AS F ON IG.GroupID = F.GroupId
WHERE f.ProductId=@ProductId
and PortfolioLineup=isnull(@PortfolioLineup, PortfolioLineup)
and CoreStrategy=isnull(@CoreStrategy, CoreStrategy)
and AdvisorCompensation=isnull(@AdvisorCompensation, AdvisorCompensation)

******************************************* *****************************

No comments:

Post a Comment