Subject Re: Queries in UDFs
Author Adam
Sorry typo:

INSERT INTO somenumbers (n) select y from substitute(1);

Also, if this is always the way your insert statements work, you could
consider using a before insert trigger to perform the substitution so
it is totally transparent.

Adam