|
Archives of the TeradataForumMessage Posted: Sat, 01 Oct 2011 @ 10:02:58 GMT
<-- Anonymously Posted: Friday, September 30, 2011 23:52 --> Hi Guys, Need your help in resolving 1 query, if you can have a look it would be great. CREATE TABLE T300_AGREEGEMENT ( Acc_No Varchar(255) ,Acc_Modifier_No Char(18) ) CREATE TABLE T309_ACC_ACC_RELATIONSHIP ( Acc_No Varchar(255) ,Acc_Relationship_Type_Cd Char(10) ,Related_Acc_No Varchar(255) ,Related_Acc_Modifier_No Char(18) ) My SQL query is as below SEL T0300.Acc_No ,T0309.Acc_Relationship_Type_Cd ,T0309.Acc_No FROM T300_AGREEGEMENT T300 INNER JOIN T309_ACC_ACC_RELATIONSHIP T309 ON T300.Acc_No = T309.Related_Acc_No AND T300.Acc_Modifier_No = T309.Related_Acc_Modifier_No My results is as below T0300.A/c# Acc_Relationship_Type_Cd T0309.Acc_No 3302 Scrty_Of MGII 3302 SK_ACCT Rentas 3302 Part_DEal AA-RES-M 9026 Part_Deal AA_RES_MYR 9026 Scrty_Of SBNMIO 9026 SK_ACCT RENTAS But I want the answerset to be as below DealId Portfolio Instrument 9026 AA_RES_MYR SBNMIO 3302 AA-RES-M MGII Thanks
| ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
Copyright 2016 - All Rights Reserved | ||||||||||||||||||||||||||||||||||||||||||||||||
Last Modified: 15 Jun 2023 | ||||||||||||||||||||||||||||||||||||||||||||||||