pears.InsertCIS07FromTemplate
Generated schema reference. Regenerate this page from the SQL unload; keep hand-maintained business notes in the narrative namespace.
Original SQL
CREATE PROCEDURE "pears"."InsertCIS07FromTemplate"( /* Application Maintained Function / Procedure - DO NOT EDIT*/ IN @PersonID CHAR(20) ) BEGIN DECLARE @UniqueTaxReference CHAR(20); DECLARE @CISVerificationNumber CHAR(20); DECLARE @CISTaxTreatment CHAR(10); DECLARE @CISVerificationDate DATE; DECLARE @CISEffectiveDate DATE; DECLARE "idum" SMALLINT; SELECT "CIS07Template"."UniqueTaxReference", "CIS07Template"."CISVerificationNumber", "CIS07Template"."CISTaxTreatment", "CIS07Template"."CISVerificationDate", "CIS07Template"."CISEffectiveDate" INTO @UniqueTaxReference, @CISVerificationNumber, @CISTaxTreatment, @CISVerificationDate, @CISEffectiveDate FROM "CIS07Template" KEY JOIN "Pay_Employee" WHERE "Pay_Employee"."PersonID" = @PersonID; UPDATE "pay_employee" SET "UniqueTaxReference" = @UniqueTaxReference, "CISVerificationNumber" = @CISVerificationNumber, "CISTaxTreatment" = @CISTaxTreatment, "CISVerificationDate" = @CISVerificationDate, "CISEffectiveDate" = @CISEffectiveDate WHERE "Pay_Employee"."PersonID" = @PersonID END GO COMMENT TO PRESERVE FORMAT ON PROCEDURE "pears"."InsertCIS07FromTemplate" IS {CREATE PROCEDURE InsertCIS07FromTemplate /* Application Maintained Function / Procedure - DO NOT EDIT*/ (IN @PersonID CHAR(20)) BEGIN DECLARE @UniqueTaxReference CHAR(20); DECLARE @CISVerificationNumber CHAR(20); DECLARE @CISTaxTreatment CHAR(10); DECLARE @CISVerificationDate DATE; DECLARE @CISEffectiveDate DATE; DECLARE idum SMALLINT; SELECT CIS07Template.UniqueTaxReference, CIS07Template.CISVerificationNumber, CIS07Template.CISTaxTreatment, CIS07Template.CISVerificationDate, CIS07Template.CISEffectiveDate INTO @UniqueTaxReference, @CISVerificationNumber, @CISTaxTreatment, @CISVerificationDate, @CISEffectiveDate FROM CIS07Template KEY JOIN Pay_Employee WHERE Pay_Employee.PersonID = @PersonID; UPDATE pay_employee SET UniqueTaxReference = @UniqueTaxReference, CISVerificationNumber = @CISVerificationNumber, CISTaxTreatment = @CISTaxTreatment, CISVerificationDate = @CISVerificationDate, CISEffectiveDate = @CISEffectiveDate WHERE Pay_Employee.PersonID = @PersonID END }