Please pardon my newbieness. This will be my first SSIS package and I am learning as I go. So far this is what I have.
I created a Control Flow. Then I created two ADO.Net connections, one for source and one for destination. Then I created 11 data flow tasks, each one copies data from a table in one database into a corresponding table in another database on the same server. Each data flow task has an ADO NET Source and ADO NET Destination. In each source I have a query that tells the source which columns I want from what table. The destination simply maps the fields together.
Okay, so far so good. Here's the rub. Some of the source queries have date criteria. An example would be:
SELECT LastName, FirstName, Address, EmploymentDate FROM TableName WHERE EmploymentDate >= '6/1/2013' AND EmploymentDate <= '7/1/2013'
I want to replace these hard-coded dates with variables. Something like:
WHERE EmploymentDate >= StartDate AND EmploymentDate <= EndDate
I've read several posts and tried to do what is being described, but it's not sinking in. So...please use my example to tell me how to do this. It would be nice if I could have the package prompt me for the EndDate when I run it, but I'd be very happy just to learn how to pass a variable into the query.
BTW, the reason I am not using OLE DB Source and OLE DB Destination is because I was getting the error:
SSIS cannot convert between unicode and non-unicode string data type
I tried solving the problem with a data conversion transformer with no luck. Switching to ADO.Net solved that problem.
tod