Calling a UDF with SELECT

From InterBase
Jump to: navigation, search

Go Up to Calling a UDF


In SELECT statements, a UDF can be used in a select list to specify data retrieval, or in the WHERE clause search condition.

The following statement uses ABS() to guarantee that a returned column value is positive:

SELECT ABS (JOB_GRADE) FROM PROJECTS;

The next statement uses DATEDIFF() in a search condition to restrict rows retrieved:

SELECT START_DATE FROM PROJECTS
WHERE DATEDIFF (:today, START_DATE) > 10;