Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

Collating Sequence

8 posts in General Discussion Last posting was on 2012-11-21 16:50:48.0Z
Karthikeyan.M Posted on 2012-11-20 08:00:53.0Z
Sender: 2a7e.50ab24ff.1804289383@sybase.com
From: Karthikeyan.M
Newsgroups: sybase.public.ase.general
Subject: Collating Sequence
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <50ab38b5.2e52.1681692777@sybase.com>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 20 Nov 2012 00:00:53 -0800
X-Trace: forums-1-dub 1353398453 172.20.134.41 (20 Nov 2012 00:00:53 -0800)
X-Original-Trace: 20 Nov 2012 00:00:53 -0800, 172.20.134.41
Lines: 3
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31500
Article PK: 74388

All,

How to view the collating sequence order installed for a db?


Rob V Posted on 2012-11-20 09:05:39.0Z
From: Rob V <rob@sypron.nl>
Reply-To: rob@sypron.nl
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:16.0) Gecko/20121026 Thunderbird/16.0.2
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: Collating Sequence
References: <50ab38b5.2e52.1681692777@sybase.com>
In-Reply-To: <50ab38b5.2e52.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <50ab47e3$1@forums-1-dub>
Date: 20 Nov 2012 01:05:39 -0800
X-Trace: forums-1-dub 1353402339 172.20.134.152 (20 Nov 2012 01:05:39 -0800)
X-Original-Trace: 20 Nov 2012 01:05:39 -0800, vip152.sybase.com
Lines: 25
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31502
Article PK: 74391


On 20-Nov-2012 09:00, Karthikeyan.M wrote:
> All,
>
> How to view the collating sequence order installed for a db?
>

Run sp_helpsort

HTH,

Rob V.
-----------------------------------------------------------------
Rob Verschoor

Certified Professional DBA for Sybase ASE, IQ, Replication Server

Author of Sybase books (order online at www.sypron.nl/shop):
"Tips, Tricks & Recipes for Sybase ASE"
"The Complete Sybase IQ Quick Reference Guide"
"The Complete Sybase ASE Quick Reference Guide"
"The Complete Sybase Replication Server Quick Reference Guide"

rob@NO.SPAM.sypron.nl | www.sypron.nl | Twitter: @rob_verschoor
Sypron B.V., The Netherlands | Chamber of Commerce 27138666
-----------------------------------------------------------------


M.Karthikeyan Posted on 2012-11-21 06:44:49.0Z
Sender: 7be2.50ac7643.846930886@sybase.com
From: M.KARTHIKEYAN
Newsgroups: sybase.public.ase.general
Subject: Re: Collating Sequence
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <50ac7861.7c37.1681692777@sybase.com>
References: <50ab47e3$1@forums-1-dub>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 20 Nov 2012 22:44:49 -0800
X-Trace: forums-1-dub 1353480289 172.20.134.41 (20 Nov 2012 22:44:49 -0800)
X-Original-Trace: 20 Nov 2012 22:44:49 -0800, 172.20.134.41
Lines: 51
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31505
Article PK: 74394

yes :)

I found that one..Now the question is,

If i want to change the collation order or sort order for a
particular query, is it possible to change it ?

In SqlServer, COLLATE keyword is used for this purpose.
Does sybase support COLLATE keyword ?

one more question...

seems like LEN() function is added in 15.0 and its later
version.

i WORKED ON 12.5.4 for the last 2 years. When I run LEN(),
it will throw the error message. So I just used DataLength()
function. But I ran LEN() function in 15.5, it is working.

is it because of new version/ new feature ? or is there any
installation required to use LEN() in 12.5.4 version ?

> On 20-Nov-2012 09:00, Karthikeyan.M wrote:
> > All,
> >
> > How to view the collating sequence order installed for a
> db? >
>
> Run sp_helpsort
>
> HTH,
>
> Rob V.
> ----------------------------------------------------------
> ------- Rob Verschoor
>
> Certified Professional DBA for Sybase ASE, IQ, Replication
> Server
>
> Author of Sybase books (order online at
> www.sypron.nl/shop): "Tips, Tricks & Recipes for Sybase
> ASE" "The Complete Sybase IQ Quick Reference Guide"
> "The Complete Sybase ASE Quick Reference Guide"
> "The Complete Sybase Replication Server Quick Reference
> Guide"
>
> rob@NO.SPAM.sypron.nl | www.sypron.nl | Twitter:
> @rob_verschoor Sypron B.V., The Netherlands | Chamber of
> Commerce 27138666
> ----------------------------------------------------------
> -------


Rob V Posted on 2012-11-21 11:07:03.0Z
From: Rob V <rob@sypron.nl>
Reply-To: rob@sypron.nl
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:16.0) Gecko/20121026 Thunderbird/16.0.2
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: Collating Sequence
References: <50ab47e3$1@forums-1-dub> <50ac7861.7c37.1681692777@sybase.com>
In-Reply-To: <50ac7861.7c37.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <50acb5d7$1@forums-1-dub>
Date: 21 Nov 2012 03:07:03 -0800
X-Trace: forums-1-dub 1353496023 172.20.134.152 (21 Nov 2012 03:07:03 -0800)
X-Original-Trace: 21 Nov 2012 03:07:03 -0800, vip152.sybase.com
Lines: 89
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31508
Article PK: 74397

Configuring a new sort order is done by changing the 'default sortorder
id' config parameter, but is not something you can or should do just
like that on an existing server. Typically you do this when creating a
new server; changing it later can have all sorts of implications like
having to rebuild indexes. And it will affect every database in the ASE
server. You should talk to your DBA about this or read up on this in the
System Administration Guide first.


The len() function was introduced in 12.5.0.3. It therefore works fine
in 12.5.4:

1> select len('abc')
2> go
-----------
3

(1 row affected)
1> select @@version
2> go
-----------------------------------------------------------------------
Adaptive Server Enterprise/12.5.4/EBF 16135 ESD#9/P/Linux
Intel/Enterprise Linux/ase1254/2143/32-bit/OPT/Wed Feb 4 05:55:50 2009


In pre-12.5.0.3, you must use char_length(), which is identical to len().

HTH,

Rob V.

On 21-Nov-2012 07:44, M.KARTHIKEYAN wrote:
> yes :)
>
> I found that one..Now the question is,
>
> If i want to change the collation order or sort order for a
> particular query, is it possible to change it ?
>
> In SqlServer, COLLATE keyword is used for this purpose.
> Does sybase support COLLATE keyword ?
>
> one more question...
>
> seems like LEN() function is added in 15.0 and its later
> version.
>
> i WORKED ON 12.5.4 for the last 2 years. When I run LEN(),
> it will throw the error message. So I just used DataLength()
> function. But I ran LEN() function in 15.5, it is working.
>
> is it because of new version/ new feature ? or is there any
> installation required to use LEN() in 12.5.4 version ?
>
>> On 20-Nov-2012 09:00, Karthikeyan.M wrote:
>>> All,
>>>
>>> How to view the collating sequence order installed for a
>> db? >
>>
>> Run sp_helpsort
>>
>> HTH,
>>
>> Rob V.
>> ----------------------------------------------------------
>> ------- Rob Verschoor
>>
>> Certified Professional DBA for Sybase ASE, IQ, Replication
>> Server
>>
>> Author of Sybase books (order online at
>> www.sypron.nl/shop): "Tips, Tricks & Recipes for Sybase
>> ASE" "The Complete Sybase IQ Quick Reference Guide"
>> "The Complete Sybase ASE Quick Reference Guide"
>> "The Complete Sybase Replication Server Quick Reference
>> Guide"
>>
>> rob@NO.SPAM.sypron.nl | www.sypron.nl | Twitter:
>> @rob_verschoor Sypron B.V., The Netherlands | Chamber of
>> Commerce 27138666
>> ----------------------------------------------------------
>> -------


Rob V Posted on 2012-11-21 11:08:36.0Z
From: Rob V <rob@sypron.nl>
Reply-To: rob@sypron.nl
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:16.0) Gecko/20121026 Thunderbird/16.0.2
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: Collating Sequence
References: <50ab47e3$1@forums-1-dub> <50ac7861.7c37.1681692777@sybase.com> <50acb5d7$1@forums-1-dub>
In-Reply-To: <50acb5d7$1@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <50acb634@forums-1-dub>
Date: 21 Nov 2012 03:08:36 -0800
X-Trace: forums-1-dub 1353496116 172.20.134.152 (21 Nov 2012 03:08:36 -0800)
X-Original-Trace: 21 Nov 2012 03:08:36 -0800, vip152.sybase.com
Lines: 113
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31509
Article PK: 74399

Just one more word of clarification: the sort order is a server-wide
property. You cannot set it for an individual database or query.

Rob V.

On 21-Nov-2012 12:07, Rob V wrote:
> Configuring a new sort order is done by changing the 'default sortorder
> id' config parameter, but is not something you can or should do just
> like that on an existing server. Typically you do this when creating a
> new server; changing it later can have all sorts of implications like
> having to rebuild indexes. And it will affect every database in the ASE
> server. You should talk to your DBA about this or read up on this in the
> System Administration Guide first.
>
>
> The len() function was introduced in 12.5.0.3. It therefore works fine
> in 12.5.4:
>
> 1> select len('abc')
> 2> go
> -----------
> 3
>
> (1 row affected)
> 1> select @@version
> 2> go
> -----------------------------------------------------------------------
> Adaptive Server Enterprise/12.5.4/EBF 16135 ESD#9/P/Linux
> Intel/Enterprise Linux/ase1254/2143/32-bit/OPT/Wed Feb 4 05:55:50 2009
>
>
> In pre-12.5.0.3, you must use char_length(), which is identical to len().
>
> HTH,
>
> Rob V.
>
>
>
>
> On 21-Nov-2012 07:44, M.KARTHIKEYAN wrote:
>> yes :)
>>
>> I found that one..Now the question is,
>>
>> If i want to change the collation order or sort order for a
>> particular query, is it possible to change it ?
>>
>> In SqlServer, COLLATE keyword is used for this purpose.
>> Does sybase support COLLATE keyword ?
>>
>> one more question...
>>
>> seems like LEN() function is added in 15.0 and its later
>> version.
>>
>> i WORKED ON 12.5.4 for the last 2 years. When I run LEN(),
>> it will throw the error message. So I just used DataLength()
>> function. But I ran LEN() function in 15.5, it is working.
>>
>> is it because of new version/ new feature ? or is there any
>> installation required to use LEN() in 12.5.4 version ?
>>
>>> On 20-Nov-2012 09:00, Karthikeyan.M wrote:
>>>> All,
>>>>
>>>> How to view the collating sequence order installed for a
>>> db? >
>>>
>>> Run sp_helpsort
>>>
>>> HTH,
>>>
>>> Rob V.
>>> ----------------------------------------------------------
>>> ------- Rob Verschoor
>>>
>>> Certified Professional DBA for Sybase ASE, IQ, Replication
>>> Server
>>>
>>> Author of Sybase books (order online at
>>> www.sypron.nl/shop): "Tips, Tricks & Recipes for Sybase
>>> ASE" "The Complete Sybase IQ Quick Reference Guide"
>>> "The Complete Sybase ASE Quick Reference Guide"
>>> "The Complete Sybase Replication Server Quick Reference
>>> Guide"
>>>
>>> rob@NO.SPAM.sypron.nl | www.sypron.nl | Twitter:
>>> @rob_verschoor Sypron B.V., The Netherlands | Chamber of
>>> Commerce 27138666
>>> ----------------------------------------------------------
>>> -------

--
HTH,

Rob V.
-----------------------------------------------------------------
Rob Verschoor

Certified Professional DBA for Sybase ASE, IQ, Replication Server

Author of Sybase books (order online at www.sypron.nl/shop):
"Tips, Tricks & Recipes for Sybase ASE"
"The Complete Sybase IQ Quick Reference Guide"
"The Complete Sybase ASE Quick Reference Guide"
"The Complete Sybase Replication Server Quick Reference Guide"

rob@NO.SPAM.sypron.nl | www.sypron.nl | Twitter: @rob_verschoor
Sypron B.V., The Netherlands | Chamber of Commerce 27138666
-----------------------------------------------------------------


Bret Halford Posted on 2012-11-21 16:26:33.0Z
From: Bret Halford <bret.halford@sap.com>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121026 Thunderbird/16.0.2
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: Collating Sequence
References: <50ab47e3$1@forums-1-dub> <50ac7861.7c37.1681692777@sybase.com> <50acb5d7$1@forums-1-dub> <50acb634@forums-1-dub>
In-Reply-To: <50acb634@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <50ad00b9$1@forums-1-dub>
Date: 21 Nov 2012 08:26:33 -0800
X-Trace: forums-1-dub 1353515193 172.20.134.152 (21 Nov 2012 08:26:33 -0800)
X-Original-Trace: 21 Nov 2012 08:26:33 -0800, vip152.sybase.com
Lines: 31
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31510
Article PK: 74398

I've never personally used it or had any experience with it, but
I believe the built-in function sortykey() allows for some use
of alternate sort orders.

http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc36271.1572/html/blocks/X13136.htm

-bret

On 11/21/2012 4:08 AM, Rob V wrote:
> Just one more word of clarification: the sort order is a server-wide
> property. You cannot set it for an individual database or query.
>
> Rob V.
>
>
> On 21-Nov-2012 12:07, Rob V wrote:
>> Configuring a new sort order is done by changing the 'default sortorder
>> id' config parameter, but is not something you can or should do just
>> like that on an existing server. Typically you do this when creating a
>> new server; changing it later can have all sorts of implications like
>> having to rebuild indexes. And it will affect every database in the ASE
>> server. You should talk to your DBA about this or read up on this in the
>> System Administration Guide first.

On 21-Nov-2012 07:44, M.KARTHIKEYAN wrote:
> yes
>
> I found that one..Now the question is,
>
> If i want to change the collation order or sort order for a
> particular query, is it possible to change it ?


Bret Halford Posted on 2012-11-21 16:28:41.0Z
From: Bret Halford <bret.halford@sap.com>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:16.0) Gecko/20121026 Thunderbird/16.0.2
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: Collating Sequence
References: <50ab47e3$1@forums-1-dub> <50ac7861.7c37.1681692777@sybase.com> <50acb5d7$1@forums-1-dub> <50acb634@forums-1-dub> <50ad00b9$1@forums-1-dub>
In-Reply-To: <50ad00b9$1@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <50ad0139$1@forums-1-dub>
Date: 21 Nov 2012 08:28:41 -0800
X-Trace: forums-1-dub 1353515321 172.20.134.152 (21 Nov 2012 08:28:41 -0800)
X-Original-Trace: 21 Nov 2012 08:28:41 -0800, vip152.sybase.com
Lines: 42
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31511
Article PK: 74400

See also the compare() function.

http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc36271.1572/html/blocks/X14054.htm

Sorry about the URLs!

-bret

11/21/2012 9:26 AM, Bret Halford wrote:
> I've never personally used it or had any experience with it, but
> I believe the built-in function sortykey() allows for some use
> of alternate sort orders.
>
> http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc36271.1572/html/blocks/X13136.htm
>
>
> -bret
>
> On 11/21/2012 4:08 AM, Rob V wrote:
>> Just one more word of clarification: the sort order is a server-wide
>> property. You cannot set it for an individual database or query.
>>
>> Rob V.
>>
>>
>> On 21-Nov-2012 12:07, Rob V wrote:
>>> Configuring a new sort order is done by changing the 'default sortorder
>>> id' config parameter, but is not something you can or should do just
>>> like that on an existing server. Typically you do this when creating a
>>> new server; changing it later can have all sorts of implications like
>>> having to rebuild indexes. And it will affect every database in the ASE
>>> server. You should talk to your DBA about this or read up on this in the
>>> System Administration Guide first.
>
> On 21-Nov-2012 07:44, M.KARTHIKEYAN wrote:
> > yes
> >
> > I found that one..Now the question is,
> >
> > If i want to change the collation order or sort order for a
> > particular query, is it possible to change it ?


Rob V Posted on 2012-11-21 16:50:48.0Z
From: Rob V <rob@sypron.nl>
Reply-To: rob@sypron.nl
User-Agent: Mozilla/5.0 (Windows NT 5.1; rv:16.0) Gecko/20121026 Thunderbird/16.0.2
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: Collating Sequence
References: <50ab47e3$1@forums-1-dub> <50ac7861.7c37.1681692777@sybase.com> <50acb5d7$1@forums-1-dub> <50acb634@forums-1-dub> <50ad00b9$1@forums-1-dub>
In-Reply-To: <50ad00b9$1@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <50ad0668@forums-1-dub>
Date: 21 Nov 2012 08:50:48 -0800
X-Trace: forums-1-dub 1353516648 172.20.134.152 (21 Nov 2012 08:50:48 -0800)
X-Original-Trace: 21 Nov 2012 08:50:48 -0800, vip152.sybase.com
Lines: 42
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:31512
Article PK: 74404

Excellent catch, Bret!
I've never used this either, and I'd completely forgotten about it
(despite it being in my ASE quickref for more than 10 years ;-).

Rob V.

On 21-Nov-2012 17:26, Bret Halford wrote:
> I've never personally used it or had any experience with it, but
> I believe the built-in function sortykey() allows for some use
> of alternate sort orders.
>
> http://infocenter.sybase.com/help/topic/com.sybase.infocenter.dc36271.1572/html/blocks/X13136.htm
>
>
> -bret
>
> On 11/21/2012 4:08 AM, Rob V wrote:
>> Just one more word of clarification: the sort order is a server-wide
>> property. You cannot set it for an individual database or query.
>>
>> Rob V.
>>
>>
>> On 21-Nov-2012 12:07, Rob V wrote:
>>> Configuring a new sort order is done by changing the 'default sortorder
>>> id' config parameter, but is not something you can or should do just
>>> like that on an existing server. Typically you do this when creating a
>>> new server; changing it later can have all sorts of implications like
>>> having to rebuild indexes. And it will affect every database in the ASE
>>> server. You should talk to your DBA about this or read up on this in the
>>> System Administration Guide first.
>
> On 21-Nov-2012 07:44, M.KARTHIKEYAN wrote:
> > yes
> >
> > I found that one..Now the question is,
> >
> > If i want to change the collation order or sort order for a
> > particular query, is it possible to change it ?