You have attempted to perform a table operation in a user-defined function referenced with an index expression.