SELECT @leftPV=SUM(TotalPv) FROM Com_Order WHERE OrderPeriod =@Duration AND MemNumber IN (SELECT MemNumber FROM dbo.Com_Member WHERE MemBinaryList LIKE '%,'+CAST(@leftLeg AS NVARCHAR(256)) + ',%')
SELECT @leftPV=SUM(TotalPv) FROM Com_Order WHERE OrderPeriod =@Duration AND MemNumber IN (SELECT MemNumber FROM dbo.Com_Member WHERE MemBinaryList LIKE '%,'+CAST(@leftLeg AS NVARCHAR(256)) + ',%')