You need to set the sortORD for the remaining values to greater than the
last important item for that query. If you had 3 item that were important,
you would need to set the sortORD to 4 for the rest of the items, that would
allow the secondary sort to actually sort.
> -Original Message-
Coalesce kicks hiney. It's so useful.
-Original Message-
From: Les Mizzell [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 19, 2007 12:15 PM
To: CF-Talk
Subject: Re: cfquery "order by" question
> Use something like
> ORDER BY COALESCE(sortORD,) ASC, #g
Coalesce simply returns the first non-null value. Like MS SQL's isnull,
but it can take more arguments.
~Brad
-Original Message-
From: Les Mizzell [mailto:[EMAIL PROTECTED]
Sent: Wednesday, December 19, 2007 12:15 PM
To: CF-Talk
Subject: Re: cfquery "order by" question
> Use something like
> ORDER BY COALESCE(sortORD,) ASC, #getPAGE.sortMETH#
Ooo - that works.
Actually, I'll admit to having never seen "coalesce" before.
Thanks very much! That eliminates something far more convoluted!
Les
~~~
> I *think* I understand what you are asking.
> What is the sortORD column value for the other 12 records you want to
> come after the first three?
Currently null, though I could set it to default to something else.
I suppose "" might be a good idea actually, then there would be
a valu
> How do I get my numberic sort fields to take priority and come up first
> without maybe having TWO queries defined and two output blocks?
Use something like
ORDER BY COALESCE(sortORD,) ASC, #getPAGE.sortMETH#
~|
AdobeĀ® Cold
I *think* I understand what you are asking.
What is the sortORD column value for the other 12 records you want to
come after the first three? If it is null or 0 then that is probably
why they are sorting to the top. You need to have something like this
probably:
sortORD,name, amount,
7 matches
Mail list logo