When I have a sql statement like select * from table1, it works great, but as soon as I put it into a function, I get:
select * from table1
ORA-00942: table or view
Make sure the function is in the same DB schema as the table.