[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index]
[Date Index]
[Thread Index]
[SQR-USERS Info]
[SQRUG Home Page]
Re: order by problem
> Field A Field B
> ------- -------
> 1 empty
> 4 5
> 7 6
> 9 empty
>
> I would like the final ordering to be 1, 5, 6, 9. Is this possible?
You should be able to use something like
order by nvl(fieldB, fieldA)
. This will order by fieldB unless it is NULL, in which case it will use
field A.
Nathan
----------------------------------------------------------------------------
Nathan Treadway | Ray Ontko & Co. | info@ontko.com (auto-reply server)
nathant@ontko.com | Richmond, IN | ftp.ontko.com, http://www.ontko.com/