Brad Stiles <[EMAIL PROTECTED]> wrote:
On 4/4/07, Nathan Biggs
<[EMAIL PROTECTED]> wrote:

Does anyone know if there is a floor function in sqlite, or of a way
to implement it.


Well, the suggestions about extending SQLite are probably quicker,
but if a SQL solution is required for portability, you can try
something like this:
select case when @float >= 0.0 then cast(@float as int) else
cast(@float-1 as int) end

This would give wrong answer if @float is negative and whole.

Igor Tandetnik

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to