UFN_PROSPECTPLAN_QUALIFIEDOPPORTUNITYCOUNT
Returns the number of qualified opportunities for a given plan.
Return
Return Type |
---|
int |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@PROSPECTPLANID | uniqueidentifier | IN |
Definition
Copy
create function dbo.UFN_PROSPECTPLAN_QUALIFIEDOPPORTUNITYCOUNT(@PROSPECTPLANID uniqueidentifier)
returns int
as begin
return (
select count(*) from dbo.OPPORTUNITY where PROSPECTPLANID=@PROSPECTPLANID and STATUSCODE in (1,2)
)
end