title: SSIS and sending query with date to Oracle
body: <p>I am trying to create a flow to pull data from an Oracle table into a SQL Server table. I am sending the following query to Oracle to get the data:</p>
  
  <pre><code>select distinct CHLD.id,
         nvl(chld_c_spl, 'N'),
         to_char(chld_d_start, 'YYYY-MM-DD') chld_d_start,
         to_char(chld_d_end, 'YYYY-MM-DD') chld_d_end
    from child chld, 
         picture ptct
   where CHLD.id = PTCT.chld_id
     and nvl(chld_d_end, sysdate) &gt;= to_date('01-JAN-2014')
     and chld_c_veri in ('HC','DR')
     and nvl(ptct_term, ptct_end) &gt;= to_date('01-JAN-2014')
  </code></pre>
  
  <p>When I run the query in Oracle, I get 505 rows returned. When I execute the SSIS package, 1,504 rows are inserted. For some reason, it looks like the query SSIS passes is not looking at the where clause for the ptct table (nvl(ptct_term, ptct_end) >= to_date('01-JAN-2014')) since all the extra rows are rows that do not have a valid entry in the picture (ptct) table.</p>
  
  <p>Does anyone have advice as to what is going on here? The original query used an exists clause on the ptct table instead of the join, but it didn't work so I converted to the join. When the exists clause was there, similar results were seen to those described above.</p>