title: How to write a SQL function that executes SELECT * FROM TABLE(name_function(date '01/01/2022'));?
body: <p>I need to write a function to which I pass a date, and in response I receive records with the same date.</p>
  <p>Table:</p>
  <pre><code>CREATE TABLE USERS(NAME VARCHAR, DATE_REG DATE);
  INSERT INTO USERS(NAME, DATE_REG) VALUES ('TEST1', '01/01/2022'),('TEST2', '01/02/2022');
  </code></pre>
  <p>I am running a function:</p>
  <pre><code>  SELECT * FROM TABLE(name_function(date '01/01/2022'));
  Expecting to receive: 'TEST1', '01/01/2022'.
  </code></pre>
  <p>How to write a function?</p>
  <p>What matters to me is that the function call was &quot;<code>SELECT * FROM TABLE(name_function(date '01/01/2022'));</code>&quot; Script need for Oracle</p>