title: Run a query based on a condition
body: <p>I am trying to run a query based on the day</p>
  
  <p>For example</p>
  
  <ul>
  <li>if it is the first of the month then select * from thistable</li>
  <li>if it is the 2nd of the month then select * from thattable</li>
  </ul>
  
  <p>Etc</p>
  
  <p>What would be the best way to do this?</p>
  
  <p>Apologize in advance if this is vague, new to PL/SQL. I know how to do it in tsql.</p>
  
  <p>I've tried below</p>
  
  <pre><code>DECLARE 
  DATENUM INT := 1;
  
  begin
   if DATENUM = 1 
          then 
               select * from thistable;
          else 
              select '* from thattable;
  
  end if;
  
  end;
  </code></pre>