Stored Procedures [dbo].[spRevenueGetItemsForRatePlan_Legacy]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Parameters
NameData TypeMax Length (Bytes)
@inOrderIdint4
Permissions
TypeActionOwning Principal
GrantExecuteMssExec
SQL Script
/*
* Don't use this stored proc directly but instead use spRevenueGetItemsForRatePlan_Synonym.
* spRevenueGetItemsForRatePlan_Synonym will either point to this stored proc or to
* spRevenueGetItemsForRatePlan_XLedger if that is active.
*
*
*    Description: ItemCodes that are associated to a specific order's rate plan..
*
*    @params:
*    @inOrderId: The primary key for the current order.
*
*/


CREATE PROCEDURE [dbo].[spRevenueGetItemsForRatePlan_Legacy]
    @inOrderId int
as
set nocount on

select distinct
    ItemCode.ICPriKey,
    ItemCode.ItemCode,
    ItemCode.[Description]
from Rates
inner join ItemCode on Rates.ICPriKey = ItemCode.ICPriKey
inner join Orders on Rates.RPPriKey = Orders.RPPriKey
where Orders.PriKey = @inOrderId
GO
GRANT EXECUTE ON  [dbo].[spRevenueGetItemsForRatePlan_Legacy] TO [MssExec]
GO
Uses
Used By