[SSIS] Microsoft OLEDB for Oracle and SQL Command with Parameters Issue

摘要:[SSIS] Microsoft OLEDB for Oracle and SQL Command with Parameters Issue

因為連線是Oarcle所以在Data Flow裡建立OLE DB Source

使用 Microsoft OLEDB for Oracle ,當要使用參數傳入時,卻出現以下訊息:

Parameters cannot be extracted from the SQL command. The provider might not help to parse parameter information from the command. In that case, use the "SQL command from variable" access mode, in which the entire SQL command is stored in a variable.

提供者無法衍生參數資訊且 SetParameterInfo 未被呼叫。 (Microsoft OLE DB Provider for Oracle)

原來是不能使用?在條件式裡面,  Select *from Table where Condition = ?,只有OLEDB for MS SQL Server才可以使用

如果是Oracle Connection 要把SQL整個組完整才能夠使用,需要使用SQL with 變數的方式

 

變數的Properoties設定:

EvaluateAsExpression = True

Expression : SQL with @Parameters