Products | Versions |
---|---|
TIBCO Cloud Integration - Connect ( Scribe ) | - |
There are scenarios where attachments (e.g. .docx, .pdf, .xlsx) that are stored in SQL server in a field in Base64 format need to be migrated into CRM.
The issue is the source field is a string with a varchar(max) data type but the target is a Byte Array data type.
This causes a data mismatch type of error when mapping the fields.
The solution is to convert the varchar(max) to varbinary(max) using the example below.
See the attached document for more detailed information
CAST(N'' AS XML).value(
'xs:base64Binary(sql:column("body" ))'
, 'VARBINARY(MAX)'
) AS "body"