Forums

Order by column ASC with NULL at bottom

ctrlmedia 18 Apr, 2017
Hi,
I can see there are many ways to make a column with numbers for example (1, 4, 2, null, 3, 6, null, 5) to order like:
(1,2,3,4,5,6, null,null)

using

ORDER BY -column DESC

ISNULL(column), column ASC;

but I am not sure how to enter any of this in to the Order By box within connectivity v6?

Thanks in advance for any help.
Kind Regards
ctrlmedia 20 Apr, 2017
Hi,
I am still stuck with this if anyone out there has any ideas, how can I order my rows with null at the end within the order by box?
(1,2,3,4,5,6, null,null)

Thanks.
ctrlmedia 20 Apr, 2017
Answer
1 Likes
For anyone needing the answer to this I think I have worked a way out - may be not the best way but it works for me.

In "Fields to Retrieve" add ISNULL(model.field) and then check "this is an extra fields list" beneath.

In "Order Fields" add:

ISNULL(model.field)/ASC
model.field/ASC



Hope this helps someone.
Regards
Max_admin 20 Apr, 2017
Glad you figured it out, thanks for posting the solution! [icon]thumbs up large[/icon]🙂

Best regards,
Max
Max, ChronoForms developer
ChronoMyAdmin: Database administration within Joomla, no phpMyAdmin needed.
ChronoMails simplifies Joomla email: newsletters, logging, and custom templates.
This topic is locked and no more replies can be posted.

VPS & Email Hosting 20% discount
hostinger