Solved

SSIS Package : Execute Sql task with a parameter from row count

Posted on 2012-04-13
5
623 Views
Last Modified: 2013-11-18
Dear All,

I have developed SSIS package whith the following components

1. Data Flow Task -  With OLE DB Source Then Row Count  with variable vrbRowCount(int32) then a Destination.

2. Execute SQL TASK  with the follwing Sql and Result set as Single row
    Update wf_cntl
Set src_rowcount = ?
Where tbl_name = 'Invoice_Header'
 
And Parameter mapping
Variable name : vrbRowCount
Direction Input
Dataa Type Long
Parameter: new parameter
Parameter value : 50

It results in an error please help what is the correct settings
0
Comment
Question by:bestway_it
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
5 Comments
 
LVL 28

Expert Comment

by:Ryan McCauley
ID: 37845720
Any chance we can get the text of the error? What you're trying to do seems reasonable, so nothing obvious jumps out, but it's hard to troubleshoot further without the specific error message being given.
0
 
LVL 21

Expert Comment

by:Jason Yousef, MS
ID: 37845879
Alright, 2 issues here, you're expecting a resultset from updating one record, and you would get nothing!!

and the second is setting the resultset to single row and configured nothing in the resultset property

Have you tried to set the ResultSet to NONE ?
0
 

Accepted Solution

by:
bestway_it earned 0 total points
ID: 37850607
Thanks guys for your input, the proble was with the Parameter Name,

http://technet.microsoft.com/en-us/library/ms140355(v=sql.105).aspx
0
 

Author Comment

by:bestway_it
ID: 38844354
Please close this question as answer was found on the TechNet website. Thank you.
0
 

Author Closing Comment

by:bestway_it
ID: 38858714
Found the answer.
0

Featured Post

Why Off-Site Backups Are The Only Way To Go

You are probably backing up your data—but how and where? Ransomware is on the rise and there are variants that specifically target backups. Read on to discover why off-site is the way to go.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
A Stored Procedure in Microsoft SQL Server is a powerful feature that it can be used to execute the Data Manipulation Language (DML) or Data Definition Language (DDL). Depending on business requirements, a single Stored Procedure can return differe…
Viewers will learn how to use the SELECT statement in SQL and will be exposed to the many uses the SELECT statement has.
The viewer will learn the benefit of using external CSS files and the relationship between class and ID selectors. Create your external css file by saving it as style.css then set up your style tags: (CODE) Reference the nav tag and set your prop…

690 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question