Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

SSIS Package with ODBC Source and OLE DB Source

Posted on 2014-02-20
3
Medium Priority
?
798 Views
Last Modified: 2016-02-10
I'm trying to do what I think is simple...
Creating a package to pull old FoxPro data and put it into a SQL table.  The insert however should only pull in "new" records. The FoxPro table has a unique key (testid).  So I thought I would have the ODBC Source and create a second source (OLE DB) which was just a query to grab the max() testid from the SQL table.  But I'm having trouble trying to figure out how to get these two seperate sources to talk to put into a single destination.  I though 'union all' would work but no matter what I do I cannot get the types (yes I created a 0 as maxtestid in the ODBC query from FoxPro) to be compatible.

Any ideas?
0
Comment
Question by:ClowWater
[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
  • 2
3 Comments
 
LVL 34

Expert Comment

by:Brian Crowe
ID: 39874093
Use an OUTER JOIN on the two sources and only pass through records where the SQLTable.uniquekey IS NULL.
0
 

Accepted Solution

by:
ClowWater earned 0 total points
ID: 39879637
BriCrowe...I tried but couldn't get it to work.

What I did to get it to work...I used a T-SQL Statment task and put max value into a user variable (thus deleting the OLEDB source).  Then used the conditional split on the ODBC source (inside data flow task) to filter out my results that I then sent to the OLEDB destination.
0
 

Author Closing Comment

by:ClowWater
ID: 39891401
worked
0

Featured Post

On Demand Webinar - Networking for the Cloud Era

This webinar discusses:
-Common barriers companies experience when moving to the cloud
-How SD-WAN changes the way we look at networks
-Best practices customers should employ moving forward with cloud migration
-What happens behind the scenes of SteelConnect’s one-click button

Question has a verified solution.

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

Ever wondered why sometimes your SQL Server is slow or unresponsive with connections spiking up but by the time you go in, all is well? The following article will show you how to install and configure a SQL job that will send you email alerts includ…
Recently we ran in to an issue while running some SQL jobs where we were trying to process the cubes.  We got an error saying failure stating 'NT SERVICE\SQLSERVERAGENT does not have access to Analysis Services. So this is a way to automate that wit…
This videos aims to give the viewer a basic demonstration of how a user can query current session information by using the SYS_CONTEXT function
Viewers will learn how the fundamental information of how to create a table.

721 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