Stored Procedures [dbo].[RevenueRatingImportInvoiceDetailUpdateAgent]
Properties
PropertyValue
ANSI Nulls OnYes
Quoted Identifier OnYes
Parameters
NameData TypeMax Length (Bytes)
@inRevenueRatingImportInvoiceDetailIDint4
@inAgentIDint4
@inImportedbit1
Permissions
TypeActionOwning Principal
GrantExecuteMssExec
SQL Script
/*
*    Module: Revenue Entry
*
*    Description: Updates the agent for a revenue import invoice detail item.
*    Error Codes:
*/

CREATE PROCEDURE [dbo].[RevenueRatingImportInvoiceDetailUpdateAgent]
    @inRevenueRatingImportInvoiceDetailID int,
    @inAgentID int,
    @inImported bit
AS
set nocount on

if( @inImported = 0 )
begin
    update RevenueRatingImportInvoiceDetail set AgentFID = @inAgentID where RevenueRatingImportInvoiceDetailID = @inRevenueRatingImportInvoiceDetailID
end
else
begin
    update RevenueRatingImportedInvoiceDetail set AgentFID = @inAgentID where RevenueRatingImportedInvoiceDetailID = @inRevenueRatingImportInvoiceDetailID
end
GO
GRANT EXECUTE ON  [dbo].[RevenueRatingImportInvoiceDetailUpdateAgent] TO [MssExec]
GO
Uses