db-derby-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Rick Hillegas <rick.hille...@gmail.com>
Subject Re: Using a SELECT FROM command correctly
Date Tue, 08 Dec 2015 14:40:13 GMT
Hi Bob,

Have you tried adding the following WHERE clause to your query:

   where ffff is not null

Hope this helps,
-Rick

On 12/7/15 6:01 PM, Bob M wrote:
> Hi
>
> I was using the following command successfully:-
>
> "SELECT * FROM xxxx ORDER BY yyyyy DESC zzzz DESC OFFSET 1 ROW FETCH NEXT 1
> ROW ONLY"
>
> where yyyyy and zzzz were date and time fields which ALWAYS had values
>
> Now I wish to alter the command to :-
>
> "SELECT * xxxx ORDER BY ffff DESC OFFSET 1 ROW FETCH NEXT 1 ROW ONLY"
>
> where ffff is an integer field which may be<NULL>
>
> Question: How can I retrieve the record with the highest ffff (non<NULL>  )
> value
>
> Thanks
>
> Bob M
>
>
>
> --
> View this message in context: http://apache-database.10148.n7.nabble.com/Using-a-SELECT-FROM-command-correctly-tp145166.html
> Sent from the Apache Derby Users mailing list archive at Nabble.com.
>


Mime
View raw message