This is an old revision of the document!
Following is an example for adding a new Business Partner address. In this example, the information for the new address is held in a SQL table named “SBO_Address_Info,” which is in a database named “VersagoData.”
SELECT Address, CardCode, Street, Block, ZipCode, City, Country, State, AdresType, CASE WHEN AdresType = 'B' THEN 1 ELSE 0 END AS [AdresTypeEnum], Address + AdresType AS [RecordBreak] FROM crd1 WHERE CardCode = 'C99001' UNION ALL SELECT AddressName, CardCode, Address1, Address2, PostCode, City, Country, State, CASE WHEN AdresType = 'B' THEN 1 ELSE 0 END Address + AdresType FROM versagoData..sbo_address_info WHERE CardCode = 'C99001'
The first part of the query returns the existing address rows for Business Partner code C99001. The second part of the query, after the UNION ALL statement, returns the row of the address to be added.
This is an example where the rows also use “Change on value …” for the “Create new record on” option. The value created by “RecordBreak” ensures that records are processed for each combination of address name + address type.
The image below shows the mapping for this process.