Solved

SSIS Package with ODBC Source and OLE DB Source

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

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

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

JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
The Delta outage: 650 cancelled flights, more than 1200 delayed flights, thousands of frustrated customers, tens of millions of dollars in damages – plus untold reputational damage to one of the world’s most trusted airlines. All due to a catastroph…
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
Viewers will learn how to use the INSERT statement to insert data into their tables. It will also introduce the NULL statement, to show them what happens when no value is giving for any given column.

786 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