
[dbo].[spRevenueGetItems_Legacy]
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS OFF
GO
CREATE PROCEDURE [dbo].[spRevenueGetItems_Legacy]
@RevGroupPriKey int,
@inOrderId int
as
set nocount on
select
ItemCode.ICPriKey,
ItemCode.ItemCode,
ItemCode.[Description],
Service = str( ItemCode.ItemCode ) + ' - ' + ItemCode.[Description],
SplitGroup = 0
from ItemCode
where ItemCode.RGPriKey = @RevGroupPriKey
union all
select
ItemCode.ICPriKey,
ItemCode.ItemCode,
ItemCode.[Description],
Service = str( ItemCode.ItemCode ) + ' - ' + ItemCode.[Description],
SplitGroup = 1
from RevGroups
inner join ItemCode on RevGroups.ICPriKey = ItemCode.ICPriKey
where RevGroups.RGPriKey = @RevGroupPriKey
GO
GRANT EXECUTE ON [dbo].[spRevenueGetItems_Legacy] TO [MssExec]
GO