Please be aware that the content in SAP SQL Anywhere Forum will be migrated to the SAP Community in June and this forum will be retired.

In a table with a column of data type (long) binary, when altering that column to data type (long) varchar/nvarchar, will that somehow convert existing data?

And what happens when doing the opposite, i.e. altering a column of data type (long) varchar/nvarchar to (long) binary?

The v12.0.1. docs tell

"If necessary, the data in the modified column is converted to the new data type."

I'm not sure what defines the necessity here. Is something like csconvert() called here with the according charsets?

(I have stored binary data and would convert the column to nvarchar as the original data is in utf-8, so I hope they will remain as-is.)

Just to clarify: I'm not dealing with varchar/nvarchar conversion...

asked 18 Mar '16, 11:49

Volker%20Barth's gravatar image

Volker Barth
accept rate: 34%

edited 18 Mar '16, 11:50

You will need to verify this is valid in your situation and that you have valid character data actually stored in your blob columns. but ...

There should be no conversion when you attempt to do this. If you had a requirement to do so you would need to do your own CSCONVERT-style conversions yourself, since only you can know something about the encoding of the raw data stored there. But it sounds like you may not have to worry about that.

Binary object are effectively the "Any" data type and have no meaning or context information associated with them.

permanent link

answered 21 Mar '16, 17:14

Nick%20Elson%20SAP%20SQL%20Anywhere's gravatar image

Nick Elson S...
accept rate: 32%

OK, thanks for the clarification, that's what I had expected, and yes, in my situation the data are valid (i.e. left unchanged) after the data type modification.

(22 Mar '16, 04:56) Volker Barth
Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text]( "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:


question asked: 18 Mar '16, 11:49

question was seen: 2,165 times

last updated: 22 Mar '16, 04:57