all groups > sql server dts > october 2006 >
You're in the

sql server dts

group:

Transform Data task - using 2 data sources in the Source query


Transform Data task - using 2 data sources in the Source query JA
10/4/2006 12:53:02 PM
sql server dts:
Hello,

Within the Transform Data Task, I need to query the Source data using
criteria from another data source. That is, within my SQL statement's WHERE
clause, I need to compare a date column from the Source with a date column in
the Destination. How can I do this? Can I use the Lookup tab to accomplish
this? I tried creating a Lookup value that uses a SELECT statement to get
the date value from the destination column - how can I use this value in the
SELECT statement that I enter into the Source tab?

Thanks!
-Jyotsna
Re: Transform Data task - using 2 data sources in the Source query arnoled
10/4/2006 1:44:36 PM
If your using sql server 2005 this should be useful

http://www.sqldts.com/default.aspx?311

Anyway, i didn't read the whole article but if you don't have sql
server 2005 you could copy the data from destination server to the
source server with a previous step, and then compare it.

JA ha escrito:

[quoted text, click to view]
Re: Transform Data task - using 2 data sources in the Source query JA
10/4/2006 1:51:02 PM
Thanks for your response.

I am using SQL Server 2000. Also, the article used 2 tables from the same
data source, while I need to compare with a different data source (different
database too) within my Transform Data task. I thought Lookup might help,
but didn't find sufficient documentation re: that.

Thanks!


[quoted text, click to view]
Re: Transform Data task - using 2 data sources in the Source query arnoled
10/4/2006 2:17:03 PM
[quoted text, click to view]
"There are many cases where using conventional T-SQL may not be an
option in achieving this. Perhaps the data is on different servers. Or
perhaps STG_DATE isn't even a table; it may be a text file. In these
cases you may have to use DTS to achieve your required results. "

Read it and you'll see that he is using diferent sources. Otherwise
it's just another join or subquery :)

Anyway, we aren't using 2005. You could just do what i said earlier.

I've never used lookups, so i can't help you with that (i didn't know
they existed till you said something :P)

JA ha escrito:

[quoted text, click to view]
AddThis Social Bookmark Button