![]() |
|
Archives of the TeradataForumMessage Posted: Mon, 08 Feb 2010 @ 15:44:34 GMT
i have two tables TableA and TableB, on the same server but different databases. the structure of TableA is as follows,
Customer -- Manager
Amr-- bOb
Brz-- steve
geb-- smith
jfk-- ny
The structure of TableB is as follows
Division -- Managerno
a123-- u5434
B234-- u5645
g312-- u6786
j765-- u5498
I have to join TableA.Customer on TableB.Division The customer 'Amr' in TableA is referenced as Division 'a123' in TableB. however there is no table which provides this crosswalk information. The crosswalk info is as follows,
TableA.Customer -> TableB.Division
Amr -> a123
Brz -> B234
geb -> g312
jfk -> j765
my output should be
customer -- manager -- managerno
Amr -- bob --u5434
Brz -- Steve -- u5645
geb -- smith -- u6786
jfk -- ny -- u5498
How can we perform this join? Will a case statement be useful? If yes, can someone revert by a sample join statement. Thanks in Advance, Regards, JK
| ||||||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
|
| ||||||||||||||||||||||||||||||||||||||||||||||||
| Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
| Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||