David T. Ashley wrote:
On 8/6/06, Chris W <[EMAIL PROTECTED]> wrote:
David T. Ashley wrote:
> Can I just write something like:
>
> SELECT * FROM mytable WHERE fieldofinterest field2) ASC;
I think this will work..
SELECT *, IF(a-b < 0,a, b) as SortField
FROM table
WHERE whatever
ORDER BY S
On 8/6/06, Chris W <[EMAIL PROTECTED]> wrote:
David T. Ashley wrote:
> Can I just write something like:
>
> SELECT * FROM mytable WHERE fieldofinterest field2) ASC;
I think this will work..
SELECT *, IF(a-b < 0,a, b) as SortField
FROM table
WHERE whatever
ORDER BY SortField
Question: Is
David T. Ashley wrote:
Can I just write something like:
SELECT * FROM mytable WHERE fieldofinterest
I think this will work..
SELECT *, IF(a-b < 0,a, b) as SortField
FROM table
WHERE whatever
ORDER BY SortField
a and b being the names of the fields you are interested in.
--
Chris W
KE5GIX
Hi,
I have a table and I'd like to do a SELECT query with the result ordered by
the minimum of two fields. I might also like to query by the minimum (but
that is an easier problem, as I can just rephrase it as an OR).
Can I just write something like:
SELECT * FROM mytable WHERE fieldofinterest