ORA-00905 SSIS 2010 OLEDB 虽然语句在 SQL 开发人员中有效

ORA-00905 SSIS 2010 OLEDB though statement works in SQL Developer

希望标题足够好冻结reader,下面是伪代码

    "SELECT DISTINCT TO_NCHAR(ID)
          , DATE
          , OPEN_DATE
          , NUMBER
          , X
          , PRODUCT
          , DESCRIPTION
          , D4
          , TO_NCHAR(CUSTOMERNAME)
       FROM CASE
 INNER JOIN CUSTOMERS ON CASE.CUSTOMERID = CUSTOMERS.ID
      WHERE CASE.DATE BETWEEN TO_DATE( '" +  Dts.Variables["start_date"].Value.ToString() + "', 'yyyy/mm/dd')"
          ;

问:如果 Oracle SQL 开发人员正在读取 运行,根本没有显示错误,当我在 VB 变量中传递代码时,为什么会这样,未命中一个字符?

这不是一个复杂的错误,实际上我是在责怪 TO_NCHAR 函数,但我测试了,就像我说的那样。

变量中的最终伪代码运行如下;

`User::sql_statement  //Locals  
{
SELECT DISTINCT TO_NCHAR(ID), DATE, OPEN_DATE,NUMBER,X,PRODUCT,            
PRODUCT_DESCRIPTION, D4, TO_NCHAR(CUSTOMERNAME) FROM CASES INNER JOIN                                   
CUSTOMERS ON     CUSTOMERID = CUSTOMERSID 
WHERE DATE >= TRUNC(TO_DATE( '2/18/2015 9:53:00 AM', 'YYYY-DD-MM'))
 }  String      //Locals`

谢谢!!!一些跟进,稍后见...