0

How can I convert 0 as float? Cast( 0 as float ) return singe not float?

for example I have a table X with F1 field - float When use

Select (cast(0 as float)) as F1 from X 

return error

Expecting float actual: Singe.

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197
  • I assume you mean "single" instead of "Singe", and btw, what gives this error, because performing the cast itself does not produce any error. – Mark Rotteveel Feb 01 '18 at 12:41

1 Answers1

0

You should cast to double precision. The float datatype in Firebird is actually a SQL real (or 32 bit single precision).

Mark Rotteveel
  • 100,966
  • 191
  • 140
  • 197