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.

Datawindow Sort

2 posts in General Discussion Last posting was on 2013-02-28 12:29:00.0Z
Samir Agrawal Posted on 2013-02-28 09:50:23.0Z
Sender: 36b6.512f2721.1804289383@sybase.com
From: Samir Agrawal
Newsgroups: sybase.public.powerbuilder.general
Subject: Datawindow Sort
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <512f285f.3723.1681692777@sybase.com>
NNTP-Posting-Host: 172.20.134.41
X-Original-NNTP-Posting-Host: 172.20.134.41
Date: 28 Feb 2013 01:50:23 -0800
X-Trace: forums-1-dub 1362045023 172.20.134.41 (28 Feb 2013 01:50:23 -0800)
X-Original-Trace: 28 Feb 2013 01:50:23 -0800, 172.20.134.41
Lines: 10
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.general:249743
Article PK: 1307991

Hi All,

I have a data-store which has a column say 'A', which can
hold both NULL and non-NULL values. How do i apply the sort
to this data-store so that all the rows where column 'A' is
NULL come first in the sort and all those where 'A' is
Non-NULL come later in the sort.

Thanks & Regards,
Samir


Brad Mettee <bmettee Posted on 2013-02-28 12:29:00.0Z
From: Brad Mettee <bmettee@.RemoveMe.pchotshots.com>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:17.0) Gecko/20130107 Thunderbird/17.0.2
MIME-Version: 1.0
Newsgroups: sybase.public.powerbuilder.general
Subject: Re: Datawindow Sort
References: <512f285f.3723.1681692777@sybase.com>
In-Reply-To: <512f285f.3723.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: <512f4d8c$1@forums-1-dub>
Date: 28 Feb 2013 04:29:00 -0800
X-Trace: forums-1-dub 1362054540 172.20.134.152 (28 Feb 2013 04:29:00 -0800)
X-Original-Trace: 28 Feb 2013 04:29:00 -0800, vip152.sybase.com
Lines: 24
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.powerbuilder.general:249746
Article PK: 1307998

Change the sort order to something like this (double click the sort
column in the sort popup, you can edit the text of it)

if(isnull(sortcol), ' ', sortcol)

OR you can change your database query to do it for you, as long as you
don't actually need to use the sortcol for anything except sorting.

if sortcol is null then ' ' else sortcol endif as sortcol

On 2/28/2013 4:50 AM, Samir Agrawal wrote:
> Hi All,
>
> I have a data-store which has a column say 'A', which can
> hold both NULL and non-NULL values. How do i apply the sort
> to this data-store so that all the rows where column 'A' is
> NULL come first in the sort and all those where 'A' is
> Non-NULL come later in the sort.
>
> Thanks & Regards,
> Samir
>