USP_BATCHMEMBERSHIPDUES_DUPLICATEMATCH_EDITSAVE_CONSTITUENT
Parameters
Parameter | Parameter Type | Mode | Description |
---|---|---|---|
@ID | uniqueidentifier | IN | |
@ORIGINALCONSTITUENTID | uniqueidentifier | IN | |
@CONSTITUENTID | uniqueidentifier | IN | |
@CURRENTAPPUSERID | uniqueidentifier | IN |
Definition
Copy
CREATE procedure dbo.USP_BATCHMEMBERSHIPDUES_DUPLICATEMATCH_EDITSAVE_CONSTITUENT
(
@ID uniqueidentifier,
@ORIGINALCONSTITUENTID uniqueidentifier,
@CONSTITUENTID uniqueidentifier,
@CURRENTAPPUSERID uniqueidentifier
)
as begin
set nocount on
declare @BATCHID uniqueidentifier
select @BATCHID = BATCHID from dbo.BATCHMEMBERSHIPDUES where ID = @ID;
begin try
-- load the new constituent data to save it to the CUB tables
declare @DATALOADED bit, @TSLONG bigint, @ISORGANIZATION bit, @ISEXISTINGCONSTITUENT bit, @LASTNAME nvarchar(100), @ORGANIZATIONNAME nvarchar(100), @FIRSTNAME nvarchar(50), @MIDDLENAME nvarchar(50),
@MAIDENNAME nvarchar(100), @NICKNAME nvarchar(50), @TITLECODEID uniqueidentifier, @SUFFIXCODEID uniqueidentifier, @GENDERCODE tinyint, @BIRTHDATE dbo.UDT_FUZZYDATE, @ISHOUSEHOLDMEMBER bit,
@ADDRESS_ADDRESSTYPECODEID uniqueidentifier, @ADDRESS_DONOTMAIL bit, @ADDRESS_DONOTMAILREASONCODEID uniqueidentifier, @ADDRESS_COUNTRYID uniqueidentifier, @ADDRESS_STATEID uniqueidentifier,
@ADDRESS_ADDRESSBLOCK nvarchar(150), @ADDRESS_CITY nvarchar(50), @ADDRESS_POSTCODE nvarchar(12), @ADDRESS_UPDATEMATCHINGHOUSEHOLDADDRESSES bit, @ADDRESS_MATCHINGHOUSEHOLDMEMBERS xml,
@ADDRESS_OMITFROMVALIDATION bit, @ADDRESS_CART nvarchar(10), @ADDRESS_DPC nvarchar(8), @ADDRESS_LOT nvarchar(5), @ADDRESS_COUNTYCODEID uniqueidentifier, @ADDRESS_CONGRESSIONALDISTRICTCODEID uniqueidentifier,
@ADDRESS_LASTVALIDATIONATTEMPTDATE datetime, @ADDRESS_VALIDATIONMESSAGE nvarchar(100), @ADDRESS_CERTIFICATIONDATA integer, @VALIDATIONCOUNTRIES xml, @PHONE_PHONETYPECODEID uniqueidentifier,
@PHONE_NUMBER nvarchar(100), @EMAILADDRESS_EMAILADDRESSTYPECODEID uniqueidentifier, @EMAILADDRESS_EMAILADDRESS dbo.UDT_EMAILADDRESS, @ORGANIZATION_ADDRESSTYPECODEID uniqueidentifier,
@ORGANIZATION_DONOTMAIL bit, @ORGANIZATION_DONOTMAILREASONCODEID uniqueidentifier, @ORGANIZATION_COUNTRYID uniqueidentifier, @ORGANIZATION_STATEID uniqueidentifier, @ORGANIZATION_ADDRESSBLOCK nvarchar(150),
@ORGANIZATION_CITY nvarchar(50), @ORGANIZATION_POSTCODE nvarchar(12), @ORGANIZATION_OMITFROMVALIDATION bit, @ORGANIZATION_CART nvarchar(10), @ORGANIZATION_DPC nvarchar(8), @ORGANIZATION_LOT nvarchar(5),
@ORGANIZATION_COUNTYCODEID uniqueidentifier, @ORGANIZATION_CONGRESSIONALDISTRICTCODEID uniqueidentifier, @ORGANIZATION_LASTVALIDATIONATTEMPTDATE datetime, @ORGANIZATION_VALIDATIONMESSAGE nvarchar(100),
@ORGANIZATION_CERTIFICATIONDATA integer, @ORGANIZATION_PHONETYPECODEID uniqueidentifier, @ORGANIZATION_NUMBER nvarchar(100), @ORGANIZATION_EMAILADDRESSTYPECODEID uniqueidentifier, @ORGANIZATION_EMAILADDRESS dbo.UDT_EMAILADDRESS,
@MARITALSTATUSCODEID uniqueidentifier, @WEBADDRESS dbo.UDT_WEBADDRESS, @INDUSTRYCODEID uniqueidentifier, @NUMEMPLOYEES int, @NUMSUBSIDIARIES int, @PARENTCORPID uniqueidentifier,
@BATCHSPOUSEID uniqueidentifier, @BATCHSPOUSERELATIONID uniqueidentifier, @SPOUSEID uniqueidentifier, @EXISTINGSPOUSE bit, @SPOUSE_LASTNAME nvarchar(100), @SPOUSE_FIRSTNAME nvarchar(50),
@SPOUSE_MIDDLENAME nvarchar(50), @SPOUSE_MAIDENNAME nvarchar(100), @SPOUSE_NICKNAME nvarchar(50), @SPOUSE_TITLECODEID uniqueidentifier, @SPOUSE_SUFFIXCODEID uniqueidentifier, @SPOUSE_GENDERCODE tinyint,
@SPOUSE_BIRTHDATE dbo.UDT_FUZZYDATE, @SPOUSE_RECIPROCALTYPECODEID uniqueidentifier, @SPOUSE_RELATIONSHIPTYPECODEID uniqueidentifier, @COPYPRIMARYINFORMATION bit, @SPOUSE_STARTDATE datetime,
@ISSPOUSERELATIONSHIP bit, @BATCHBUSINESSID uniqueidentifier, @BATCHBUSINESSRELATIONID uniqueidentifier, @BUSINESSID uniqueidentifier, @EXISTINGBUSINESS bit, @BUSINESS_NAME nvarchar(100),
@BUSINESS_ADDRESSTYPECODEID uniqueidentifier, @BUSINESS_COUNTRYID uniqueidentifier, @BUSINESS_STATEID uniqueidentifier, @BUSINESS_ADDRESSBLOCK nvarchar(150), @BUSINESS_CITY nvarchar(50),
@BUSINESS_POSTCODE nvarchar(12), @BUSINESS_DONOTMAIL bit, @BUSINESS_DONOTMAILREASONCODEID uniqueidentifier, @BUSINESS_OMITFROMVALIDATION bit, @BUSINESS_CART nvarchar(10), @BUSINESS_DPC nvarchar(8),
@BUSINESS_LOT nvarchar(5), @BUSINESS_COUNTYCODEID uniqueidentifier, @BUSINESS_CONGRESSIONALDISTRICTCODEID uniqueidentifier, @BUSINESS_LASTVALIDATIONATTEMPTDATE datetime, @BUSINESS_VALIDATIONMESSAGE nvarchar(100),
@BUSINESS_CERTIFICATIONDATA integer, @BUSINESS_PHONETYPECODEID uniqueidentifier, @BUSINESS_NUMBER nvarchar(100), @BUSINESS_RECIPROCALTYPECODEID uniqueidentifier, @BUSINESS_RELATIONSHIPTYPECODEID uniqueidentifier,
@BUSINESS_STARTDATE datetime, @ISCONTACT bit, @ISPRIMARYCONTACT bit, @CONTACTTYPECODEID uniqueidentifier, @POSITION nvarchar(100), @ISMATCHINGGIFTRELATIONSHIP bit, @ZIPLOOKUPCOUNTRIES xml, @ISGROUP bit,
@ISHOUSEHOLD bit, @GROUP_NAME nvarchar(100), @GROUP_DESCRIPTION nvarchar(300), @GROUP_GIVESANONYMOUSLY bit, @GROUP_ADDRESSTYPECODEID uniqueidentifier, @GROUP_COUNTRYID uniqueidentifier, @GROUP_ADDRESSBLOCK nvarchar(150),
@GROUP_CITY nvarchar(50), @GROUP_STATEID uniqueidentifier, @GROUP_POSTCODE nvarchar(12), @GROUP_OMITFROMVALIDATION bit, @GROUP_CART nvarchar(10), @GROUP_DPC nvarchar(8), @GROUP_LOT nvarchar(5),
@GROUP_COUNTYCODEID uniqueidentifier, @GROUP_CONGRESSIONALDISTRICTCODEID uniqueidentifier, @GROUP_LASTVALIDATIONATTEMPTDATE datetime, @GROUP_VALIDATIONMESSAGE nvarchar(100), @GROUP_CERTIFICATIONDATA integer,
@GROUP_PHONETYPECODEID uniqueidentifier, @GROUP_NUMBER nvarchar(100), @GROUP_EMAILADDRESSTYPECODEID uniqueidentifier, @GROUP_EMAILADDRESS dbo.UDT_EMAILADDRESS, @GROUP_WEBADDRESS dbo.UDT_WEBADDRESS, @GROUP_DONOTMAIL bit,
@GROUP_DONOTMAILREASONCODEID uniqueidentifier, @GROUP_UPDATEMATCHINGHOUSEHOLDADDRESSES bit, @GROUP_GROUPTYPEID uniqueidentifier, @GROUP_PRIMARYCONTACTID uniqueidentifier, @GROUP_MEMBERS xml,
@GROUP_NEWMEMBERSEARCHID uniqueidentifier, @GROUP_STARTDATE datetime, @HOUSEHOLD_HOUSEHOLDSCANBEDONORS bit, @HOUSEHOLD_PRIMARYCONTACTID uniqueidentifier, @HOUSEHOLD_PRIMARYCONTACT_KEYNAME nvarchar(100),
@HOUSEHOLD_PRIMARYCONTACT_FIRSTNAME nvarchar(50), @HOUSEHOLD_PRIMARYCONTACT_MIDDLENAME nvarchar(50), @HOUSEHOLD_PRIMARYCONTACT_TITLECODEID uniqueidentifier, @HOUSEHOLD_PRIMARYCONTACT_SUFFIXCODEID uniqueidentifier,
@HOUSEHOLD_PRIMARYCONTACT_COPYHOUSEHOLDCONTACT bit, @HOUSEHOLD_SECONDMEMBERID uniqueidentifier, @HOUSEHOLD_SECONDMEMBER_KEYNAME nvarchar(100), @HOUSEHOLD_SECONDMEMBER_FIRSTNAME nvarchar(50), @HOUSEHOLD_SECONDMEMBER_MIDDLENAME nvarchar(50),
@HOUSEHOLD_SECONDMEMBER_TITLECODEID uniqueidentifier, @HOUSEHOLD_SECONDMEMBER_SUFFIXCODEID uniqueidentifier, @HOUSEHOLD_SECONDMEMBER_COPYHOUSEHOLDCONTACT bit, @HOUSEHOLD_SECONDMEMBER_RELATIONSHIP_RECIPROCALTYPECODEID uniqueidentifier,
@HOUSEHOLD_SECONDMEMBER_RELATIONSHIP_RELATIONSHIPTYPECODEID uniqueidentifier, @HOUSEHOLD_SECONDMEMBER_RELATIONSHIP_STARTDATE datetime, @HOUSEHOLD_SECONDMEMBER_RELATIONSHIP_ISSPOUSE bit, @HOUSEHOLDCOPYPRIMARYCONTACTINFO bit,
@DEFAULTCOUNTRYID uniqueidentifier, @JOBCATEGORYCODEID uniqueidentifier, @CAREERLEVELCODEID uniqueidentifier, @GROUP_DONOTCALL bit, @GROUP_DONOTEMAIL bit,
@ADDRESSID uniqueidentifier, @PHONEID uniqueidentifier, @EMAILADDRESSID uniqueidentifier, @SITEID uniqueidentifier, @CONSTITUENTSECURITYGROUPID uniqueidentifier, @CONSTITUENCYCODEID uniqueidentifier,
@NAMEFORMATS xml, @SPOUSE_LOOKUPID nvarchar(100), @PHONE_COUNTRYID uniqueidentifier,
@SPOUSE_PRIMARYSOFTCREDITRELATIONSHIPEXISTS bit, @SPOUSE_PRIMARYSOFTCREDITMATCHFACTOR decimal(5,2), @SPOUSE_PRIMARYRECOGNITIONTYPECODEID uniqueidentifier, @SPOUSE_RECIPROCALSOFTCREDITRELATIONSHIPEXISTS bit,
@SPOUSE_RECIPROCALSOFTCREDITMATCHFACTOR decimal(5,2), @SPOUSE_RECIPROCALRECOGNITIONTYPECODEID uniqueidentifier, @BUSINESS_PRIMARYSOFTCREDITRELATIONSHIPEXISTS bit, @BUSINESS_PRIMARYSOFTCREDITMATCHFACTOR decimal(5,2),
@BUSINESS_PRIMARYRECOGNITIONTYPECODEID uniqueidentifier, @BUSINESS_RECIPROCALSOFTCREDITRELATIONSHIPEXISTS bit, @BUSINESS_RECIPROCALSOFTCREDITMATCHFACTOR decimal(5,2), @BUSINESS_RECIPROCALRECOGNITIONTYPECODEID uniqueidentifier,
@INFOSOURCECODEID uniqueidentifier, @ORIGINAL_KEYNAME nvarchar(100), @ORIGINAL_FIRSTNAME nvarchar(50), @GENDERCODEID uniqueidentifier, @SPOUSE_GENDERCODEID uniqueidentifier;
-- the form ID is a concatenated nvarchar using the new constituent ID for the load
declare @EDITFORMID nvarchar(110) = cast(@ORIGINALCONSTITUENTID as nvarchar(36)) + '|' + cast(@BATCHID as nvarchar(36)) + '|' + cast(@ID as nvarchar(36))
exec dbo.USP_DATAFORMTEMPLATE_EDITLOAD_REVENUEBATCHCONSTITUENTINBATCH @EDITFORMID, @DATALOADED output, @TSLONG output, @ISORGANIZATION output, @ISEXISTINGCONSTITUENT output, @LASTNAME output, @ORGANIZATIONNAME output, @FIRSTNAME output, @MIDDLENAME output,
@MAIDENNAME output, @NICKNAME output, @TITLECODEID output, @SUFFIXCODEID output, @GENDERCODE output, @BIRTHDATE output, @ISHOUSEHOLDMEMBER output,
@ADDRESS_ADDRESSTYPECODEID output, @ADDRESS_DONOTMAIL output, @ADDRESS_DONOTMAILREASONCODEID output, @ADDRESS_COUNTRYID output, @ADDRESS_STATEID output,
@ADDRESS_ADDRESSBLOCK output, @ADDRESS_CITY output, @ADDRESS_POSTCODE output, @ADDRESS_UPDATEMATCHINGHOUSEHOLDADDRESSES output, @ADDRESS_MATCHINGHOUSEHOLDMEMBERS output,
@ADDRESS_OMITFROMVALIDATION output, @ADDRESS_CART output, @ADDRESS_DPC output, @ADDRESS_LOT output, @ADDRESS_COUNTYCODEID output, @ADDRESS_CONGRESSIONALDISTRICTCODEID output,
@ADDRESS_LASTVALIDATIONATTEMPTDATE output, @ADDRESS_VALIDATIONMESSAGE output, @ADDRESS_CERTIFICATIONDATA output, @VALIDATIONCOUNTRIES output, @PHONE_PHONETYPECODEID output,
@PHONE_NUMBER output, @EMAILADDRESS_EMAILADDRESSTYPECODEID output, @EMAILADDRESS_EMAILADDRESS output, @ORGANIZATION_ADDRESSTYPECODEID output,
@ORGANIZATION_DONOTMAIL output, @ORGANIZATION_DONOTMAILREASONCODEID output, @ORGANIZATION_COUNTRYID output, @ORGANIZATION_STATEID output, @ORGANIZATION_ADDRESSBLOCK output,
@ORGANIZATION_CITY output, @ORGANIZATION_POSTCODE output, @ORGANIZATION_OMITFROMVALIDATION output, @ORGANIZATION_CART output, @ORGANIZATION_DPC output, @ORGANIZATION_LOT output,
@ORGANIZATION_COUNTYCODEID output, @ORGANIZATION_CONGRESSIONALDISTRICTCODEID output, @ORGANIZATION_LASTVALIDATIONATTEMPTDATE output, @ORGANIZATION_VALIDATIONMESSAGE output,
@ORGANIZATION_CERTIFICATIONDATA output, @ORGANIZATION_PHONETYPECODEID output, @ORGANIZATION_NUMBER output, @ORGANIZATION_EMAILADDRESSTYPECODEID output, @ORGANIZATION_EMAILADDRESS output,
@MARITALSTATUSCODEID output, @WEBADDRESS output, @INDUSTRYCODEID output, @NUMEMPLOYEES output, @NUMSUBSIDIARIES output, @PARENTCORPID output,
@BATCHSPOUSEID output, @BATCHSPOUSERELATIONID output, @SPOUSEID output, @EXISTINGSPOUSE output, @SPOUSE_LASTNAME output, @SPOUSE_FIRSTNAME output,
@SPOUSE_MIDDLENAME output, @SPOUSE_MAIDENNAME output, @SPOUSE_NICKNAME output, @SPOUSE_TITLECODEID output, @SPOUSE_SUFFIXCODEID output, @SPOUSE_GENDERCODE output,
@SPOUSE_BIRTHDATE output, @SPOUSE_RECIPROCALTYPECODEID output, @SPOUSE_RELATIONSHIPTYPECODEID output, @COPYPRIMARYINFORMATION output, @SPOUSE_STARTDATE output,
@ISSPOUSERELATIONSHIP output, @BATCHBUSINESSID output, @BATCHBUSINESSRELATIONID output, @BUSINESSID output, @EXISTINGBUSINESS output, @BUSINESS_NAME output,
@BUSINESS_ADDRESSTYPECODEID output, @BUSINESS_COUNTRYID output, @BUSINESS_STATEID output, @BUSINESS_ADDRESSBLOCK output, @BUSINESS_CITY output,
@BUSINESS_POSTCODE output, @BUSINESS_DONOTMAIL output, @BUSINESS_DONOTMAILREASONCODEID output, @BUSINESS_OMITFROMVALIDATION output, @BUSINESS_CART output, @BUSINESS_DPC output,
@BUSINESS_LOT output, @BUSINESS_COUNTYCODEID output, @BUSINESS_CONGRESSIONALDISTRICTCODEID output, @BUSINESS_LASTVALIDATIONATTEMPTDATE output, @BUSINESS_VALIDATIONMESSAGE output,
@BUSINESS_CERTIFICATIONDATA output, @BUSINESS_PHONETYPECODEID output, @BUSINESS_NUMBER output, @BUSINESS_RECIPROCALTYPECODEID output, @BUSINESS_RELATIONSHIPTYPECODEID output,
@BUSINESS_STARTDATE output, @ISCONTACT output, @ISPRIMARYCONTACT output, @CONTACTTYPECODEID output, @POSITION output, @ISMATCHINGGIFTRELATIONSHIP output, @ZIPLOOKUPCOUNTRIES output, @ISGROUP output,
@ISHOUSEHOLD output, @GROUP_NAME output, @GROUP_DESCRIPTION output, @GROUP_GIVESANONYMOUSLY output, @GROUP_ADDRESSTYPECODEID output, @GROUP_COUNTRYID output, @GROUP_ADDRESSBLOCK output,
@GROUP_CITY output, @GROUP_STATEID output, @GROUP_POSTCODE output, @GROUP_OMITFROMVALIDATION output, @GROUP_CART output, @GROUP_DPC output, @GROUP_LOT output,
@GROUP_COUNTYCODEID output, @GROUP_CONGRESSIONALDISTRICTCODEID output, @GROUP_LASTVALIDATIONATTEMPTDATE output, @GROUP_VALIDATIONMESSAGE output, @GROUP_CERTIFICATIONDATA output,
@GROUP_PHONETYPECODEID output, @GROUP_NUMBER output, @GROUP_EMAILADDRESSTYPECODEID output, @GROUP_EMAILADDRESS output, @GROUP_WEBADDRESS output, @GROUP_DONOTMAIL output,
@GROUP_DONOTMAILREASONCODEID output, @GROUP_UPDATEMATCHINGHOUSEHOLDADDRESSES output, @GROUP_GROUPTYPEID output, @GROUP_PRIMARYCONTACTID output, @GROUP_MEMBERS output,
@GROUP_NEWMEMBERSEARCHID output, @GROUP_STARTDATE output, @HOUSEHOLD_HOUSEHOLDSCANBEDONORS output, @HOUSEHOLD_PRIMARYCONTACTID output, @HOUSEHOLD_PRIMARYCONTACT_KEYNAME output,
@HOUSEHOLD_PRIMARYCONTACT_FIRSTNAME output, @HOUSEHOLD_PRIMARYCONTACT_MIDDLENAME output, @HOUSEHOLD_PRIMARYCONTACT_TITLECODEID output, @HOUSEHOLD_PRIMARYCONTACT_SUFFIXCODEID output,
@HOUSEHOLD_PRIMARYCONTACT_COPYHOUSEHOLDCONTACT output, @HOUSEHOLD_SECONDMEMBERID output, @HOUSEHOLD_SECONDMEMBER_KEYNAME output, @HOUSEHOLD_SECONDMEMBER_FIRSTNAME output, @HOUSEHOLD_SECONDMEMBER_MIDDLENAME output,
@HOUSEHOLD_SECONDMEMBER_TITLECODEID output, @HOUSEHOLD_SECONDMEMBER_SUFFIXCODEID output, @HOUSEHOLD_SECONDMEMBER_COPYHOUSEHOLDCONTACT output, @HOUSEHOLD_SECONDMEMBER_RELATIONSHIP_RECIPROCALTYPECODEID output,
@HOUSEHOLD_SECONDMEMBER_RELATIONSHIP_RELATIONSHIPTYPECODEID output, @HOUSEHOLD_SECONDMEMBER_RELATIONSHIP_STARTDATE output, @HOUSEHOLD_SECONDMEMBER_RELATIONSHIP_ISSPOUSE output, @HOUSEHOLDCOPYPRIMARYCONTACTINFO output,
@CURRENTAPPUSERID, @DEFAULTCOUNTRYID output, @JOBCATEGORYCODEID output, @CAREERLEVELCODEID output, @GROUP_DONOTCALL output, @GROUP_DONOTEMAIL output,
@ADDRESSID output, @PHONEID output, @EMAILADDRESSID output, @SITEID output, @CONSTITUENTSECURITYGROUPID output, @CONSTITUENCYCODEID output,
null, @INFOSOURCECODEID output, null, @NAMEFORMATS output,
@PHONE_COUNTRYID output, @SPOUSE_LOOKUPID output, @SPOUSE_PRIMARYSOFTCREDITRELATIONSHIPEXISTS output, @SPOUSE_PRIMARYSOFTCREDITMATCHFACTOR output, @SPOUSE_PRIMARYRECOGNITIONTYPECODEID output,
@SPOUSE_RECIPROCALSOFTCREDITRELATIONSHIPEXISTS output, @SPOUSE_RECIPROCALSOFTCREDITMATCHFACTOR output, @SPOUSE_RECIPROCALRECOGNITIONTYPECODEID output, @BUSINESS_PRIMARYSOFTCREDITRELATIONSHIPEXISTS output,
@BUSINESS_PRIMARYSOFTCREDITMATCHFACTOR output, @BUSINESS_PRIMARYRECOGNITIONTYPECODEID output, @BUSINESS_RECIPROCALSOFTCREDITRELATIONSHIPEXISTS output, @BUSINESS_RECIPROCALSOFTCREDITMATCHFACTOR output,
@BUSINESS_RECIPROCALRECOGNITIONTYPECODEID output, @ORIGINAL_KEYNAME output, @ORIGINAL_FIRSTNAME output, @GENDERCODEID output, @SPOUSE_GENDERCODEID output;
-- call the save with the matched @CONSTITUENTID
set @EDITFORMID = cast(@CONSTITUENTID as nvarchar(36)) + '|' + cast(@BATCHID as nvarchar(36)) + '|' + cast(@ID as nvarchar(36))
exec dbo.USP_DATAFORMTEMPLATE_EDIT_REVENUEBATCHCONSTITUENTINBATCH_5 @EDITFORMID, null, @LASTNAME, @ORGANIZATIONNAME, @FIRSTNAME, @MIDDLENAME, @MAIDENNAME, @NICKNAME,
@TITLECODEID, @SUFFIXCODEID, @GENDERCODE, @BIRTHDATE, @ADDRESS_ADDRESSTYPECODEID, @ADDRESS_DONOTMAIL, @ADDRESS_DONOTMAILREASONCODEID, @ADDRESS_COUNTRYID, @ADDRESS_STATEID,
@ADDRESS_ADDRESSBLOCK, @ADDRESS_CITY, @ADDRESS_POSTCODE, @ADDRESS_UPDATEMATCHINGHOUSEHOLDADDRESSES, @ADDRESS_OMITFROMVALIDATION, @ADDRESS_CART, @ADDRESS_DPC, @ADDRESS_LOT,
@ADDRESS_COUNTYCODEID, @ADDRESS_CONGRESSIONALDISTRICTCODEID,@ADDRESS_LASTVALIDATIONATTEMPTDATE , @ADDRESS_VALIDATIONMESSAGE, @ADDRESS_CERTIFICATIONDATA,
@PHONE_PHONETYPECODEID, @PHONE_NUMBER, @EMAILADDRESS_EMAILADDRESSTYPECODEID, @EMAILADDRESS_EMAILADDRESS, @MARITALSTATUSCODEID, @ORGANIZATION_ADDRESSTYPECODEID, @ORGANIZATION_DONOTMAIL,
@ORGANIZATION_DONOTMAILREASONCODEID, @ORGANIZATION_COUNTRYID, @ORGANIZATION_STATEID, @ORGANIZATION_ADDRESSBLOCK, @ORGANIZATION_CITY, @ORGANIZATION_POSTCODE,
@ORGANIZATION_OMITFROMVALIDATION, @ORGANIZATION_CART, @ORGANIZATION_DPC, @ORGANIZATION_LOT, @ORGANIZATION_COUNTYCODEID, @ORGANIZATION_CONGRESSIONALDISTRICTCODEID,
@ORGANIZATION_LASTVALIDATIONATTEMPTDATE, @ORGANIZATION_VALIDATIONMESSAGE, @ORGANIZATION_CERTIFICATIONDATA, @ORGANIZATION_PHONETYPECODEID, @ORGANIZATION_NUMBER,
@ORGANIZATION_EMAILADDRESSTYPECODEID, @ORGANIZATION_EMAILADDRESS, @WEBADDRESS, @INDUSTRYCODEID, @NUMEMPLOYEES, @NUMSUBSIDIARIES, @PARENTCORPID, @BATCHSPOUSEID,
@BATCHSPOUSERELATIONID, @SPOUSEID, @EXISTINGSPOUSE, @SPOUSE_LASTNAME, @SPOUSE_FIRSTNAME, @SPOUSE_MIDDLENAME, @SPOUSE_MAIDENNAME, @SPOUSE_NICKNAME, @SPOUSE_TITLECODEID,
@SPOUSE_SUFFIXCODEID, @SPOUSE_GENDERCODE, @SPOUSE_BIRTHDATE, @SPOUSE_RECIPROCALTYPECODEID, @SPOUSE_RELATIONSHIPTYPECODEID, @COPYPRIMARYINFORMATION, @SPOUSE_STARTDATE,
@ISSPOUSERELATIONSHIP, @BATCHBUSINESSID, @BATCHBUSINESSRELATIONID, @BUSINESSID, @EXISTINGBUSINESS, @BUSINESS_NAME, @BUSINESS_ADDRESSTYPECODEID, @BUSINESS_COUNTRYID,
@BUSINESS_STATEID, @BUSINESS_ADDRESSBLOCK, @BUSINESS_CITY, @BUSINESS_POSTCODE, @BUSINESS_DONOTMAIL, @BUSINESS_DONOTMAILREASONCODEID, @BUSINESS_OMITFROMVALIDATION, @BUSINESS_CART,
@BUSINESS_DPC, @BUSINESS_LOT, @BUSINESS_COUNTYCODEID, @BUSINESS_CONGRESSIONALDISTRICTCODEID, @BUSINESS_LASTVALIDATIONATTEMPTDATE , @BUSINESS_VALIDATIONMESSAGE,
@BUSINESS_CERTIFICATIONDATA, @BUSINESS_PHONETYPECODEID, @BUSINESS_NUMBER, @BUSINESS_RECIPROCALTYPECODEID, @BUSINESS_RELATIONSHIPTYPECODEID, @BUSINESS_STARTDATE, @ISCONTACT,
@ISPRIMARYCONTACT, @CONTACTTYPECODEID, @POSITION, @ISMATCHINGGIFTRELATIONSHIP, @CURRENTAPPUSERID, @GROUP_NAME, @GROUP_DESCRIPTION, @GROUP_GIVESANONYMOUSLY, @GROUP_ADDRESSTYPECODEID,
@GROUP_COUNTRYID, @GROUP_ADDRESSBLOCK, @GROUP_CITY, @GROUP_STATEID, @GROUP_OMITFROMVALIDATION, @GROUP_CART, @GROUP_DPC, @GROUP_LOT, @GROUP_COUNTYCODEID,
@GROUP_CONGRESSIONALDISTRICTCODEID, @GROUP_LASTVALIDATIONATTEMPTDATE , @GROUP_VALIDATIONMESSAGE, @GROUP_CERTIFICATIONDATA, @GROUP_POSTCODE, @GROUP_PHONETYPECODEID, @GROUP_NUMBER, @GROUP_EMAILADDRESSTYPECODEID,
@GROUP_EMAILADDRESS, @GROUP_WEBADDRESS, @GROUP_DONOTMAIL, @GROUP_DONOTMAILREASONCODEID, @GROUP_UPDATEMATCHINGHOUSEHOLDADDRESSES, @GROUP_GROUPTYPEID, @GROUP_PRIMARYCONTACTID, @GROUP_MEMBERS,
@GROUP_NEWMEMBERSEARCHID, @GROUP_STARTDATE, @HOUSEHOLD_PRIMARYCONTACTID, @HOUSEHOLD_PRIMARYCONTACT_KEYNAME, @HOUSEHOLD_PRIMARYCONTACT_FIRSTNAME, @HOUSEHOLD_PRIMARYCONTACT_MIDDLENAME,
@HOUSEHOLD_PRIMARYCONTACT_TITLECODEID, @HOUSEHOLD_PRIMARYCONTACT_SUFFIXCODEID, @HOUSEHOLD_PRIMARYCONTACT_COPYHOUSEHOLDCONTACT, @HOUSEHOLD_SECONDMEMBERID, @HOUSEHOLD_SECONDMEMBER_KEYNAME,
@HOUSEHOLD_SECONDMEMBER_FIRSTNAME, @HOUSEHOLD_SECONDMEMBER_MIDDLENAME, @HOUSEHOLD_SECONDMEMBER_TITLECODEID, @HOUSEHOLD_SECONDMEMBER_SUFFIXCODEID, @HOUSEHOLD_SECONDMEMBER_COPYHOUSEHOLDCONTACT,
@HOUSEHOLD_SECONDMEMBER_RELATIONSHIP_RECIPROCALTYPECODEID, @HOUSEHOLD_SECONDMEMBER_RELATIONSHIP_RELATIONSHIPTYPECODEID, @HOUSEHOLD_SECONDMEMBER_RELATIONSHIP_STARTDATE,
@HOUSEHOLD_SECONDMEMBER_RELATIONSHIP_ISSPOUSE, @HOUSEHOLDCOPYPRIMARYCONTACTINFO, @JOBCATEGORYCODEID, @CAREERLEVELCODEID, @GROUP_DONOTCALL, @GROUP_DONOTEMAIL,
@ADDRESSID, @PHONEID, @EMAILADDRESSID, @SITEID, @CONSTITUENTSECURITYGROUPID, @CONSTITUENCYCODEID,
@INFOSOURCECODEID, @NAMEFORMATS, @PHONE_COUNTRYID, @SPOUSE_LOOKUPID, @SPOUSE_PRIMARYSOFTCREDITRELATIONSHIPEXISTS,
@SPOUSE_PRIMARYSOFTCREDITMATCHFACTOR, @SPOUSE_PRIMARYRECOGNITIONTYPECODEID, @SPOUSE_RECIPROCALSOFTCREDITRELATIONSHIPEXISTS, @SPOUSE_RECIPROCALSOFTCREDITMATCHFACTOR, @SPOUSE_RECIPROCALRECOGNITIONTYPECODEID,
@BUSINESS_PRIMARYSOFTCREDITRELATIONSHIPEXISTS, @BUSINESS_PRIMARYSOFTCREDITMATCHFACTOR, @BUSINESS_PRIMARYRECOGNITIONTYPECODEID, @BUSINESS_RECIPROCALSOFTCREDITRELATIONSHIPEXISTS,
@BUSINESS_RECIPROCALSOFTCREDITMATCHFACTOR, @BUSINESS_RECIPROCALRECOGNITIONTYPECODEID, @ORIGINAL_KEYNAME,@ORIGINAL_FIRSTNAME, @GENDERCODEID , @SPOUSE_GENDERCODEID ;
end try
begin catch
exec dbo.USP_RAISE_ERROR;
return 1;
end catch
return 0;
end