UFN_ALL_UNACKNOWLEDGED_REVENUE_IN_SPECIFIC_RANGE
Returns all revenue within a specific amount range
Return
Return Type |
---|
table |
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@lowerAmount | money | IN | |
@upperAmount | money | IN |
Definition
Copy
CREATE function dbo.UFN_ALL_UNACKNOWLEDGED_REVENUE_IN_SPECIFIC_RANGE(@lowerAmount money, @upperAmount money)
returns table
as return
select
REVENUE.ID
from
dbo.REVENUE
where
REVENUE.ID not in (select REVENUELETTER.REVENUEID from dbo.REVENUELETTER) and
(
REVENUE.AMOUNT > @lowerAmount
and
REVENUE.AMOUNT <= @upperAmount
)