Search code examples
sqlsap-ase

how to truncate a number in sybase ASE?


http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.infocenter.dc38151.1540/doc/html/san1278453173757.html

The functions TRUNCATE and TRUNCNUM are not supported in Adaptive Server Enterprise.

Does anyone know another way of doing this in ASE?

Thanks


Solution

  • I know these ways:

    select Number = floor ( 455.443 )
    select Number = cast ( 455.443 as int )
    select Number = convert ( int, 455.443 )
    select Number = 455.443 - ( 455.443 % 1 )