Log in
::
Register
::
Not logged in
Home
Tags
Articles
Editorials
Stairways
Forums
Scripts
Videos
Blogs
QotD
Books
Ask SSC
SQL Jobs
Training
Authors
About us
Contact us
Newsletters
Write for us
Recent Posts
Recent Posts
Popular Topics
Popular Topics
Home
Search
Members
Calendar
Who's On
Home
»
SQL Server 2005
»
SQL Server 2005 Integration Services
»
Destination data checking
Destination data checking
Rate Topic
Display Mode
Topic Options
Author
Message
farooq.hbs
farooq.hbs
Posted Wednesday, November 21, 2012 5:06 AM
SSC Journeyman
Group: General Forum Members
Last Login: Monday, March 18, 2013 1:44 AM
Points: 99,
Visits: 160
Hi,
Destination (OLE DB) has two table with existing data. (table1 : Person with Bonus and Table2: Person without bonus)
The requirement is i want to insert the data from Excel source to these above table (OLE DB) Destination,
Before inserting i want to check if the data (Specifically person Id) which i'm gonna insert is already exists or not,
If Exists (Person), then i should not insert the duplicate data
If Exists (personId)but there is some updation , then i should update the particular record.
Please help on this. how to perform the above funtionalilty.
Below is the data flow my package
Excel Source (3 files) to UNION all task(To union all the 3 files data) to Sort Task(To sort the data ascendingly) to Aggregate ( Sum the metric values using group by person Id)
To Conditional Split( Perons Id with Bonus and Person Id without Bonus) to Ole db Destination.
Post #1387366
Koen Verbeeck
Koen Verbeeck
Posted Thursday, November 22, 2012 12:04 AM
SSCrazy Eights
Group: General Forum Members
Last Login: Yesterday @ 6:54 AM
Points: 9,364,
Visits: 6,462
You can use a Lookup component to check if the record exists in the destination or not.
How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
Member of
LinkedIn
. My blog at
LessThanDot
.
MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1387733
farooq.hbs
farooq.hbs
Posted Thursday, November 22, 2012 1:58 AM
SSC Journeyman
Group: General Forum Members
Last Login: Monday, March 18, 2013 1:44 AM
Points: 99,
Visits: 160
Thanks for the reply.
The table has the row with person Id 204
The PersonId 204 row is updated with bonus to without bonus(Say 10 to 15)..
I want to update the particular row but the person id is already present in the destination.
If i use lookup task then it will not update the particular row.
Let no know if there any task for ths plz
Post #1387759
Koen Verbeeck
Koen Verbeeck
Posted Thursday, November 22, 2012 2:46 AM
SSCrazy Eights
Group: General Forum Members
Last Login: Yesterday @ 6:54 AM
Points: 9,364,
Visits: 6,462
With the Lookup task you will check if the person with ID 204 is already in the destination or not.
If it is, you retrieve the bonus column (call it bonus_dest). Then you compare it with the bonus column of the source in a conditional split. If the values are the same, you don't need to do an update. If they are different, you need to do the update with an OLE DB Command.
Be aware that the OLE DB Command executes a SQL statement for every row, so it is really slow for large datasets.
How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
Member of
LinkedIn
. My blog at
LessThanDot
.
MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1387787
farooq.hbs
farooq.hbs
Posted Monday, November 26, 2012 4:39 AM
SSC Journeyman
Group: General Forum Members
Last Login: Monday, March 18, 2013 1:44 AM
Points: 99,
Visits: 160
Hi guys,
I have many excel files in the folder. I want to insert the data of all these files into tables with the excel files name.
I create a package with Foreach loop container with data flow tsk into it with varibles defininf the files name.
Variables:
Name : FileName
Scope : Package
Datatype : String.
Value : E:\Farooq\SSIS data Sources ( In this folder there are multiple excel files)
I added derived column task to the flow and in the derived column, i used this varible but i'm not getting proper result and it is throwing error.
Added to this, I configured the excel expression properties as
Excel File Path : @User::FileName
I'm not getting the desired result.
Please help me on this.
Post #1388527
Koen Verbeeck
Koen Verbeeck
Posted Monday, November 26, 2012 4:49 AM
SSCrazy Eights
Group: General Forum Members
Last Login: Yesterday @ 6:54 AM
Points: 9,364,
Visits: 6,462
What is the error?
How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
Member of
LinkedIn
. My blog at
LessThanDot
.
MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1388531
farooq.hbs
farooq.hbs
Posted Monday, November 26, 2012 4:57 AM
SSC Journeyman
Group: General Forum Members
Last Login: Monday, March 18, 2013 1:44 AM
Points: 99,
Visits: 160
It is not taking the second file.. And it is not inserting the file name too.
Post #1388537
Koen Verbeeck
Koen Verbeeck
Posted Monday, November 26, 2012 6:02 AM
SSCrazy Eights
Group: General Forum Members
Last Login: Yesterday @ 6:54 AM
Points: 9,364,
Visits: 6,462
I mean the actual error description. The one that shows in the output tab in BIDS.
How to post forum questions.
Need an answer? No, you need a question.
What’s the deal with Excel & SSIS?
Member of
LinkedIn
. My blog at
LessThanDot
.
MCSA SQL Server 2012 - MCSE Business Intelligence
Post #1388569
« Prev Topic
|
Next Topic »
Permissions
You
cannot
post new topics.
You
cannot
post topic replies.
You
cannot
post new polls.
You
cannot
post replies to polls.
You
cannot
edit your own topics.
You
cannot
delete your own topics.
You
cannot
edit other topics.
You
cannot
delete other topics.
You
cannot
edit your own posts.
You
cannot
edit other posts.
You
cannot
delete your own posts.
You
cannot
delete other posts.
You
cannot
post events.
You
cannot
edit your own events.
You
cannot
edit other events.
You
cannot
delete your own events.
You
cannot
delete other events.
You
cannot
send private messages.
You
cannot
send emails.
You
may
read topics.
You
cannot
rate topics.
You
cannot
vote within polls.
You
cannot
upload attachments.
You
may
download attachments.
You
cannot
post HTML code.
You
cannot
edit HTML code.
You
cannot
post IFCode.
You
cannot
post JavaScript.
You
cannot
post EmotIcons.
You
cannot
post or upload images.
Copyright © 2002-2013 Simple Talk Publishing. All Rights Reserved.
Privacy Policy.
Terms of Use.
Report Abuse.