Subject Re: [firebird-support]
Author Alan.Davies@aldis-systems.co.uk
Or you could use the FIXEDPOINT udf from the FreeUDFLib library, readily
available, follow links on Ibphoenix website.
The standard version gives a 256 character returned field, you could
change that
to 12 and then use:
select f_fixedpoint(your_field_name,3),' ',12)
Alan

Quoting Helen Borrie <helebor@...>:

> At 05:54 PM 11/04/2006, you wrote:
>> Hi ,
>>
>>
>>
>> I've CAST a double precision to a VARCHAR. This gives me a result of
>> 15.180000000
>>
>> I'd like to format the string to be displayed as 15.180
>
> Well, you could write a UDF for it.
>
> Or simply cast the DP to numeric(18,3) instead of varchar.
>
> ./heLen
>
>
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Visit http://firebird.sourceforge.net and click the Resources item
> on the main (top) menu. Try Knowledgebase and FAQ links !
>
> Also search the knowledgebases at http://www.ibphoenix.com
>
> ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
>
> Yahoo! Groups Links
>
>
>
>
>
>
>
>



--
Alan J Davies
Aldis
Tel: +44 (0)1926 842069
Mob: +44 (0)7885 372793