title: Start a Case Statement without an outside 'Select' - CTE's
body: <p>Running this query (below) returns a 'Too Many Values' error:</p>
  
  <pre><code>select 
  case
       when to_char(sysdate, 'yyyymmdd') = to_char(sysdate, 'yyyymm') || '01'
       then (select FirstReportGroups.*, FirstReportDetails.*
             from FirstReportGroups, FirstReportDetails)
  
       when to_char(sysdate, 'yyyymmdd') = to_char(sysdate, 'yyyymm') || '16'
       then (select SecondReportGroups.*, SecondReportDetails.*
             from SecondReportGroups, SecondReportDetails)
  end as LetsSee
  from cmtmpentered t1 join cmtmpconf t2    
        on t1.casenumber = t2.casenumber    
        and t1.enc = t2.enc 
  ;
  </code></pre>
  
  <p>I'm using CTE's (they are not included because it would make this very long) and it makes logical sense to me, but googling this 'Too Many Values' error gives me no substantial help. Running the CTE's individually works, so that is not the problem.</p>
  
  <p>I think all would be solved if I could only get rid of the outside 'Select' statement and just keep the selects inside the Case. If I'm explaining this poorly, an example of what I'm looking for is this:</p>
  
  <pre><code>case
       when to_char(sysdate, 'yyyymmdd') = to_char(sysdate, 'yyyymm') || '01'
       then (select FirstReportGroups.*, FirstReportDetails.*
             from FirstReportGroups, FirstReportDetails)
  
       when to_char(sysdate, 'yyyymmdd') = to_char(sysdate, 'yyyymm') || '16'
       then (select SecondReportGroups.*, SecondReportDetails.*
             from SecondReportGroups, SecondReportDetails)
  end as LetsSee
  ;
  </code></pre>
  
  <p>Is this doable in any capacity? This syntax obviously doesn't work, otherwise I wouldn't be asking the question - but is there a related way I can do this?</p>