Solved

SSIS Package with ODBC Source and OLE DB Source

Posted on 2014-02-20
3
710 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
  • 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

Get up to 2TB FREE CLOUD per backup license!

An exclusive Black Friday offer just for Expert Exchange audience! Buy any of our top-rated backup solutions & get up to 2TB free cloud per system! Perform local & cloud backup in the same step, and restore instantly—anytime, anywhere. Grab this deal now before it disappears!

Join & Write a Comment

Use this article to create a batch file to backup a Microsoft SQL Server database to a Windows folder.  The folder can be on the local hard drive or on a network share.  This batch file will query the SQL server to get the current date & time and wi…
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.
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to extract insert data into a SQL Server database table using the Import/Export option and Bulk Insert.

707 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

Need Help in Real-Time?

Connect with top rated Experts

15 Experts available now in Live!

Get 1:1 Help Now