Code:
END
ELSE
BEGIN
--Add a new row if customer number doesn't already exist insert new values in the dynamics table RM00101
INSERT INTO RM00101 (CUSTNMBR, CUSTNAME, ADRSCODE, ADDRESS1, CITY, STATE, COUNTRY, ZIP, PHONE1, FAX, FRSTINDT, CNTCPRSN, PHONE2)
VALUES (@CUSTNMBR, @CUSTNAME, @ADRSCODE, @ADDRESS1, @CITY, @STATE, @COUNTRY, @ZIP, @PHONE1, @FAX, @FRSTINDT, @CNTCPRSN,
@PHONE2)
--Add a new row if customer number doesn't already exist insert new values in the dynamics table RM00102
INSERT INTO RM00102 (CUSTNMBR, ADRSCODE, ADDRESS1, CITY, STATE, COUNTRY, ZIP, PHONE1, FAX, PHONE2)
VALUES (@CUSTNMBR, @ADRSCODE, @ADDRESS1, @CITY, @STATE, @COUNTRY, @ZIP, @PHONE1, @FAX, @PHONE2)
END