Consultor Eletrônico



Kbase P25592: How to convert a character expression to a numeric value in SQL-92.
Autor   Progress Software Corporation - Progress
Acesso   Público
Publicação   15/10/2008
Status: Unverified

GOAL:

How to convert a character expression to a numeric value in SQL-92.

GOAL:

Convert character to numeric value.

GOAL:

TO_NUMBER()

FACT(s) (Environment):

Windows
Progress 9.1D

FIX:

To convert a character expression to a numeric value in SQL-92 use the TO_NUMBER scalar function:

SELECT *
FROM customer
WHERE TO_NUMBER (SUBSTR (phone, 1, 3)) = 603 ;

Notes:
· The argument to the function must be of type CHARACTER.
· The result is of type NUMERIC.
· If any of the argument expressions evaluates to null, the result is null.