@@ -10,21 +10,21 @@ AS BEGIN
1010 DeliveryCityID = ISNULL(json .DeliveryCityID , Purchasing .Suppliers .DeliveryCityID),
1111 PostalCityID = ISNULL(json .PostalCityID , Purchasing .Suppliers .PostalCityID),
1212 SupplierReference = json .SupplierReference ,
13- BankAccountName = json .BankAccountName ,
14- BankAccountBranch = json .BankAccountBranch ,
15- BankAccountCode = json .BankAccountCode ,
16- BankAccountNumber = json .BankAccountNumber ,
13+ BankAccountName = ISNULL( json .BankAccountName , Purchasing . Suppliers .BankAccountName) ,
14+ BankAccountBranch = ISNULL( json .BankAccountBranch , Purchasing . Suppliers .BankAccountBranch) ,
15+ BankAccountCode = ISNULL( json .BankAccountCode , Purchasing . Suppliers .BankAccountCode) ,
16+ BankAccountNumber = ISNULL( json .BankAccountNumber , Purchasing . Suppliers .BankAccountNumber) ,
1717 BankInternationalCode = json .BankInternationalCode ,
1818 PaymentDays = ISNULL(json .PaymentDays , Purchasing .Suppliers .PaymentDays),
19- InternalComments = json .InternalComments ,
19+ InternalComments = ISNULL( json .InternalComments , Purchasing . Suppliers .InternalComments) ,
2020 PhoneNumber = ISNULL(json .PhoneNumber , Purchasing .Suppliers .PhoneNumber),
2121 FaxNumber = ISNULL(json .FaxNumber , Purchasing .Suppliers .FaxNumber),
2222 WebsiteURL = ISNULL(json .WebsiteURL , Purchasing .Suppliers .WebsiteURL),
2323 DeliveryAddressLine1 = ISNULL(json .DeliveryAddressLine1 , Purchasing .Suppliers .DeliveryAddressLine1),
24- DeliveryAddressLine2 = json .DeliveryAddressLine2 ,
24+ DeliveryAddressLine2 = ISNULL( json .DeliveryAddressLine2 , Purchasing . Suppliers .DeliveryAddressLine2) ,
2525 DeliveryPostalCode = ISNULL(json .DeliveryPostalCode , Purchasing .Suppliers .DeliveryPostalCode),
2626 PostalAddressLine1 = ISNULL(json .PostalAddressLine1 , Purchasing .Suppliers .PostalAddressLine1),
27- PostalAddressLine2 = json .PostalAddressLine2 ,
27+ PostalAddressLine2 = ISNULL( json .PostalAddressLine2 , Purchasing . Suppliers .PostalAddressLine2) ,
2828 PostalPostalCode = ISNULL(json .PostalPostalCode , Purchasing .Suppliers .PostalPostalCode),
2929 LastEditedBy = @UserID
3030 FROM OPENJSON (@Supplier)
0 commit comments