You can only call a table function in the FROM clause of an SQL SELECT request (see Teradata Vantage™ - SQL Data Manipulation Language, B035-1146), which includes calling table functions in the FROM clause of a subquery. Calling a table function from any other clause within a query causes the system to abort the request and returns an error to the requestor.