title: SAP HANA insert into table, select from calcualtion view fails
body: <p>System SAP HANA 1 SPS 12 : 1.00.112.16.1520578817</p>
  
  <p>The following SQL fails : </p>
  
  <pre><code>drop table #my_new_table;
  
  create local temporary column table #my_new_table (
      "AMPEL" varchar(5000),
      "ReportingLevel0" varchar(5000) , 
      "ReportingLevel1" varchar(255), 
      "ReportingLevel2" varchar(255), 
      "PosStatus" varchar(255), 
      "DirtyValue" double, 
      "DirtyValueT0" double,
      "FullPL" double, 
      "CashPL" double, 
      "UniqueID" varchar(255), 
      "CHECK_ID" BIGINT , 
      "NAME" varchar(255), 
      "CT" varchar(255), 
      "CT_ERGEBNIS_UNIQUE_ID" BIGINT , 
      "RUN_ID" BIGINT 
  );
  
  truncate table #my_new_table;
  insert into #my_new_table (ampel, "ReportingLevel0")
  select ampel, "ReportingLevel0" from (
  SELECT 
      CASE WHEN "CT_ERGEBNIS_UNIQUE_ID" IS NULL THEN 0 ELSE 8 END as "AMPEL", 
      "ReportingLevel0", "ReportingLevel1", "ReportingLevel2", "PosStatus", "DirtyValue", "DirtyValueT0",
      "FullPL", "CashPL", "UniqueID", "CHECK_ID", b."NAME", "CT", "CT_ERGEBNIS_UNIQUE_ID", "RUN_ID" 
  FROM "_SYS_BIC"."xxx.dataset/PnL_Dataset"(
          PLACEHOLDER."$$jobId1$$" =&gt; 'XXXD401B-EA88-48DA-9EE6-CAE688440XXX', 
          PLACEHOLDER."$$jobId2$$" =&gt; 'XXXACBEA-5CE9-4661-AB19-654A66DD8XXX', 
          PLACEHOLDER."$$relevantJob$$" =&gt; 'XXXD401B-EA88-48DA-9EE6-CAE688440XXX') a 
      LEFT JOIN ( 
          SELECT * FROM "_SYS_BIC"."meag.app.h4q.checks/READ_JOIN_ATT_FROM_CHECK_RESULTS" 
          WHERE CHECK_ID IN ( 
              SELECT "CHECK_ID.CHECK_ID" 
              FROM     "MEAG_APP_H4Q_METADATA_001"."meag.app.h4q.metadata::DB.CHECK_TEMPLATE" 
              WHERE "DATENSEGMENT_ID.DATENSEGMENT_ID" = 7) 
                  AND targetdate = ( 
                      SELECT DISTINCT a."DueDate" 
                      FROM "MEAG_EIM_TQL_001_TARGET"."TG_dbo_T_Job" a 
                          join     "MEAG_EIM_TQL_001_TARGET"."TG_dbo_T_PL_Instrument" b on b."JobId" = a."JobId" 
                      WHERE a."JobId" = '6BCD401B-EA88-48DA-9EE6-CAE688440A3C'
                 ) AND ( targetjobid = 'XXXD401B-EA88-48DA-9EE6-CAE688440XXX' OR targetjobid = '') 
  ) b ON a."T_SCD_Instrument_RH_WPID" = b.WPID AND a."T_SCD_Instrument_RH_LegNo" = b."LegNo" 
  ) ;
  </code></pre>
  
  <p>Error Message is:</p>
  
  <pre><code>Could not execute 'insert into #my_new_table (ampel, "ReportingLevel0") SELECT CASE WHEN "CT_ERGEBNIS_UNIQUE_ID" IS ...'
  SAP DBTech JDBC: [269]: too many values: ReportingLevel1: line 4 col 21 (at pos 158)
  </code></pre>