Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

DTS multiple rows from multiple tables 1

Status
Not open for further replies.

jigen3

Technical User
Oct 19, 2003
13
JP
hi,
i have two tables: table A has city names and the country they belong to, table B has the country and its currency. is there a way i can output the city from table A, and the currency used in the city from table B in a single query through DTS? thx for any replies.

jigen3
 
You could use a LookUp for the currency value with the following query

SELECT Currency FROM B WHERE Country = ?

Then write a DTS package using an ActiveX script and use the following:
DTSDestination("Currency") = DTSLookups("Currency").Execute(DTSSource("Country"))

 
You could just use the query:

Code:
[blue]SELECT[/blue]
   a.City,
   b.Currency
[blue]FROM[/blue]
   TableA as a
[blue]INNER JOIN[/blue]
   TableB as b
[blue]ON[/blue]
   a.Country = b.Country
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top