dbTalk Databases Forums  

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

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Transform Data task - using 2 data sources in the Source query in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
JA
 
Posts: n/a

Default Transform Data task - using 2 data sources in the Source query - 10-04-2006 , 02:53 PM






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


Reply With Quote
  #2  
Old   
arnoled
 
Posts: n/a

Default Re: Transform Data task - using 2 data sources in the Source query - 10-04-2006 , 03:44 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:

Quote:
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


Reply With Quote
  #3  
Old   
JA
 
Posts: n/a

Default Re: Transform Data task - using 2 data sources in the Source query - 10-04-2006 , 03:51 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!


"arnoled" wrote:

Quote:
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:

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



Reply With Quote
  #4  
Old   
arnoled
 
Posts: n/a

Default Re: Transform Data task - using 2 data sources in the Source query - 10-04-2006 , 04:17 PM



Quote:
From de article:
"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:

Quote:
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!


"arnoled" wrote:

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:

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




Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.