Welcome to the new Gigaspaces XAP forum. To recover your account, please follow these instructions.

Ask Your Question
0

SQLQuery in read() always sorts null values first

Hi,

When I run this query in the space browser of the GigaSpaces Management Center:

select uid,* from Unit where location = '01' and customer = '6031' order by unitModel desc

Rows with a null value in unitModel always display first regardless of the (desc/asc) in the order by clause.

Is there a way to control this behavior? I would like null values to always sort lowest (first if asc/ last if desc).

Thanks, Jackie

{quote}This thread was imported from the previous forum. For your reference, the original is [available here|http://forum.openspaces.org/thread.jspa?threadID=2743]{quote}

asked 2008-12-01 10:26:00 -0600

jbilder gravatar image

updated 2013-08-08 09:52:00 -0600

jaissefsfex gravatar image
edit retag flag offensive close merge delete

2 Answers

Sort by ยป oldest newest most voted
0

Jackie,
Please submit a feature request/bug report via the support page to fix this issue.
http://www.gigaspaces.com/supportform
Please provide relevant code to reproduce this issue.
Shay

answered 2008-12-04 14:39:07 -0600

shay hassidim gravatar image
edit flag offensive delete link more

Comments

Hi, do you have any solution for this issue?

Thanks, Mikhail

Mikhail gravatar imageMikhail ( 2014-09-24 03:18:21 -0600 )edit

I am looking for the answer of this issue as well. Any solution from Gigaspace?

sernle gravatar imagesernle ( 2016-02-15 03:46:06 -0600 )edit
0

You can add 'nulls last' to get null values last:

select uid,* from Unit where location = '01' and customer = '6031' order by unitModel desc NULLS LAST

answered 2016-02-16 09:57:43 -0600

Dixson Huie gravatar image
edit flag offensive delete link more

Comments

nulls last functionality was added in XAP 10.1

Dixson Huie gravatar imageDixson Huie ( 2016-02-16 10:53:55 -0600 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2008-12-01 10:26:00 -0600

Seen: 130 times

Last updated: Feb 16 '16