Hello Spiceheads,
I am trying to adapt a series of SQL update statements to update part descriptions in MS SQL Server. Right now the data is all in an Excel spreadsheet.
Part of my challenge is that I have to convert a very large string to binary. Cool, I've got that part worked out.
The on-going issue that I am having is that many of descriptions are multi-line and I cannot seem to preserve the carriage return in when running the update statement.
Here is my query right now:
UPDATE PART_BINARY SET BITS=CAST('XXXXX' AS VARBINARY(8000)) WHERE PART_ID='YYYYY';
To get the carriage returns, I have tried:
'XX' + char(13) + 'XX' + char(13) + ' X'
'XX' + char(10) + 'XX' + char(10) + ' X'
I've tried combinations of both. However, it does not preserve the carriage returns when I look at the data in my ERP.
Any thoughts or suggestions are appreciated.
...