0

I have parameter into SSIS:

enter image description here and I try to use that parameter into query like: enter image description here

How do I call my parameter v_sEstatusPresupuesto at final of my query?

I try to use @v_sEstatusPresupuesto but it don´t works. Regards

1

1 Answer 1

2

If you are using an ADO.NET Source then you can use an expression on the Data Flow Task for the SQL command of your data source. Something like this:

enter image description here

If you are using an OLE DB Source then put the above expression on a variable and in the data source select SQL command from variable as the Data access mode.

Another method if you are using an OLE DB Source is to select SQL command as the Data access mode and change your query to this:

SELECT 
  ZPRESUPUESTO
  ,DWERK
FROM ZTSD_PRESPZA_WF
WHERE MANDT = 720 
  AND ZVERSION = ?

Then click on the parameters button next to the SQL command text box and assign your parameter.

enter image description here

Sign up to request clarification or add additional context in comments.

2 Comments

I add it as a variable ut I cant use into ADO .NET Source because I don´t have SQL Command from Variable on Data Access Mode what can I do there?
If it is an ADO.Net source then go with the first option and use an expression. Click on the Data Flow task that holds your Data Source to select it (don't click on the Data Source). Go to properties (Lower right-hand side of Visual Studio). Scroll down until you find Expressions and click the little 3 dot menu to bring up the Expression editor. From the property drop-down select the SQLCommand for your data source. For the expression add the example in my answer.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.