0

I have my sort ordering in Sybase as: 45 190 altdict - Alternate (lower-case first) dictionary ordering Am I right that alternate means "aAbBcC..zZ" ordering?

What should I do to change ordering with "ORDER BY" as 'ABC..YZabc..yz' ? What sort ordering to choose?

Where may it be changed? In a session? In SQL statement? as far as I know I need to change the whole server sort ordering and rebuilt indexes. But there are a bunch of databases with different owners and different users and it seems a bit extreme

markp-fuso
  • 2,471
  • 1
  • 6
  • 19
Mikhail Aksenov
  • 371
  • 2
  • 12

1 Answers1

1

The ASE dataserver is configured with a single sort order; see selecting default sort order.

For scenarios where the user needs to use a sort order different from the dataserver's default sort order there is:

  • sortkey() - allows for sorting data by a user-selected sort order
markp-fuso
  • 2,471
  • 1
  • 6
  • 19
  • thank you, that totally answers my question "select * from aksenov_test order by sortkey(a, 50) desc" works perfect – Mikhail Aksenov Feb 07 '20 at 17:00
  • good to hear; I don't recall having used `sortkey()` before so it's good to know something works as advertised in the documentation! :-) – markp-fuso Feb 07 '20 at 17:04