USP_DATAFORMTEMPLATE_EDITLOAD_REVENUEBATCHPRIMARYBUSINESSADDRESSVALIDATION
The load procedure used by the edit dataform template "Revenue Batch Primary Business Address Validation Edit Data Form"
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | uniqueidentifier | IN | The input ID parameter used to load the fields defined on the form. |
@DATALOADED | bit | INOUT | Output parameter indicating whether or not data was actually loaded. |
@TSLONG | bigint | INOUT | Output parameter indicating the TSLONG value of the record being edited. This is used to manage multi-user concurrency issues when multiple users access the same record. |
@COUNTRYID | uniqueidentifier | INOUT | Country |
@ADDRESSBLOCK | nvarchar(150) | INOUT | Address |
@CITY | nvarchar(50) | INOUT | City |
@STATEID | uniqueidentifier | INOUT | State |
@POSTCODE | nvarchar(12) | INOUT | ZIP |
@CART | nvarchar(10) | INOUT | CART |
@DPC | nvarchar(8) | INOUT | DPC |
@LOT | nvarchar(5) | INOUT | LOT |
@CERTIFICATIONDATA | int | INOUT | Certification data |
@CONGRESSIONALDISTRICTCODEID | uniqueidentifier | INOUT | Congressional district |
@COUNTYCODEID | uniqueidentifier | INOUT | County |
@OMITFROMVALIDATION | bit | INOUT | Omit from validation |
Definition
Copy
CREATE procedure dbo.USP_DATAFORMTEMPLATE_EDITLOAD_REVENUEBATCHPRIMARYBUSINESSADDRESSVALIDATION
(
@ID uniqueidentifier,
@DATALOADED bit = 0 output,
@TSLONG bigint = 0 output,
@COUNTRYID uniqueidentifier = null output,
@ADDRESSBLOCK nvarchar(150) = null output,
@CITY nvarchar(50) = null output,
@STATEID uniqueidentifier = null output,
@POSTCODE nvarchar(12) = null output,
@CART nvarchar(10) = null output,
@DPC nvarchar(8) = null output,
@LOT nvarchar(5) = null output,
@CERTIFICATIONDATA int = null output,
@CONGRESSIONALDISTRICTCODEID uniqueidentifier = null output,
@COUNTYCODEID uniqueidentifier = null output,
@OMITFROMVALIDATION bit = null output
)
as
set nocount on;
set @DATALOADED = 0
set @TSLONG = 0
select
@DATALOADED = 1,
@TSLONG = BATCHREVENUE.TSLONG,
@COUNTRYID = [COUNTRYID],
@ADDRESSBLOCK = [ADDRESSBLOCK],
@CITY = [CITY],
@STATEID = [STATEID],
@POSTCODE = [POSTCODE],
@CART = [CART],
@DPC = [DPC],
@LOT = [LOT],
@CONGRESSIONALDISTRICTCODEID = [CONGRESSIONALDISTRICTCODEID],
@CERTIFICATIONDATA = [CERTIFICATIONDATA],
@COUNTYCODEID = COUNTYCODEID,
@OMITFROMVALIDATION = OMITFROMVALIDATION
from dbo.BATCHREVENUE
inner join dbo.BATCHREVENUECONSTITUENTRELATION on BATCHREVENUE.CONSTITUENTID = BATCHREVENUECONSTITUENTRELATION.CONSTITUENTID
inner join dbo.BATCHREVENUECONSTITUENT on BATCHREVENUECONSTITUENTRELATION.RELATIONID = BATCHREVENUECONSTITUENT.ID and BATCHREVENUECONSTITUENTRELATION.ISPRIMARYBUSINESS = 1
where BATCHREVENUE.ID = @ID
return 0;