3

I couldn't find the option to pass a parameter to the ODBC Source? I could see lot of article related to this but I couldn't find the same option in the Data flow Task expression. The [ODBC Source].[SqlCommand] isn't in the of the Data Flow task.

Property expression

The article I referred as below:

Can anyone please help on this?

Hadi
  • 36,233
  • 13
  • 65
  • 124
Tanmoy Santra
  • 55
  • 1
  • 4
  • Out of interest, why are you using an ODBC connection and not an OLEDB? Unless my memory is failing me, I'm pretty sure BIDS/SQL Server 2008 supported OLEDB. – Thom A Feb 04 '19 at 15:59
  • What are you using in SSIS where your trying to pass variable? Or something else. If an Execute SQL task? If so you can build out your SQL statement in a variable in SSIS using expressions and in your SQL task use variable instead of input text. – Brad Feb 04 '19 at 17:53
  • I want to connect IBM Netezza and execute a query passing a date parameter to it. SQL task won't work here – Tanmoy Santra Feb 04 '19 at 18:11
  • What are the SQL Server and visual studio and SSDT versions you are working with? – Hadi Feb 04 '19 at 18:56

1 Answers1

0

I think that the property is missing due to a mismatch between Visual Studio , SSDT and SQL Server versions. First, you have to check that you are using the relevant and appropriate versions, you can check the following links for more information:

Also try to check the package Target Server Version:

Similar issues links


Update 1

While searching on this issue, i found that [ODBC Source].[SqlCommand] property might be not found in versions earlier than 2012 (2005,2008), but i found a link that mentioned a workaround:

You can easily put in params if the source is an OLE DB source, but what if it is an ODBC Source? You have to use the DataReader source, and you can’t easily set params – like a WHERE statement. You HAVE to use Expressions in order to have a query with a dynamic WHERE statement or passing in a variable as WHERE statement filter.

So, throw a DataFlow on your package, and inside that, throw a DataReader source, and then set the connection to your ODBC Connection (ADO.NET Connection) and set the command text.

Community
  • 1
  • 1
Hadi
  • 36,233
  • 13
  • 65
  • 124
  • Will check regarding the mismatch. The version VS 2017 (SSDT) Version 15.9.4 .SSIS Target version 2016 & SQl Server :Microsoft SQL Server 2016 (SP2-CU2) (KB4340355) - 13.0.5153.0 (X64) – Tanmoy Santra Feb 05 '19 at 12:14