Please be aware that the SAP SQL Anywhere Forum will be shut down on August 29th, 2024 when all it's content will be migrated to the SAP Community.

In a database with AccentSensitive=off the Replace function treats 'a' and 'ä' the same. So does any way exists to temporarily force AccentSensitivity for the Replace function?

asked 09 Oct '15, 09:21

Martin's gravatar image

accept rate: 14%

If you are just trying to come up with a 'key' to do sorting on you might wnat to review the "sort_collation" option but it sounds like you are intent upon some sort of translation.

As far as I can tell, that would need a collation-tailoring to accomplish this and there are only the 2 [Strng] functions SORTKEY( ) and COMPARE( ) that have that support. Neither of those will accomplish this by themselves.

It seems to require custom logic. External function logic may be a better solution.

(09 Oct '15, 11:11) Nick Elson S...
Replies hidden

yes we now use a external .net function to do the trick

(12 Oct '15, 03:38) Martin

Treating the whole string as binary (and therefore case sensitivity and the like) would be too strong, I guess? Otherwise, replace() with binary datatypes might do the trick.

permanent link

answered 11 Oct '15, 07:08

Volker%20Barth's gravatar image

Volker Barth
accept rate: 34%

converted 12 Oct '15, 04:43

Martin's gravatar image



I think binary replace is available from SQLA 17 up

(12 Oct '15, 04:44) Martin
Replies hidden

Yes, I should have known better, as I asked that a while ago:

How do builtin string functions work with binary data?

and Mark has explained that REPLACE() (pre-v17) does only work with character data and would convert binary input into character data...

(12 Oct '15, 05:13) 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: 09 Oct '15, 09:21

question was seen: 2,278 times

last updated: 12 Oct '15, 05:13