Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
vipin_jha123
Starting Member
31 Posts |
Posted - 2011-04-11 : 01:51:58
|
i want ti take the below given query in ouet select Select gam.foracidFrom TBAADM.GAMWhere gam.acid In (Select gam.acid From tbaadm.gam, tbaadm.tam Where GAM.acid = TAM.repayment_acid)but when i am doing that i am getting error of ORA-01427: single-row subquery returns more than one row i want the above query likeselect gam.acct_name,gam.cif_id,gam.schm_code,(Select gam.foracidFrom TBAADM.GAMWhere gam.acid In (Select gam.acid From tbaadm.gam, tbaadm.tam Where GAM.acid = TAM.repayment_acid)) table1from tbaadm.gamplease provide the necessery result |
|
lionofdezert
Aged Yak Warrior
885 Posts |
Posted - 2011-04-11 : 03:11:43
|
select acct_name, cif_id, schm_code, ( Select foracid From TBAADM InnerTable Where acid = OuterTable.repayment_acid ) AS foracidfrom tbaadm OuterTable -- ORSELECT FirstTable.acct_name, FirstTable.cif_id, FirstTable.schm_code, SecondTable.foracidFROM tbaadm FirstTable INNER JOIN tbaadm SecondTable ON FirstTable.repayment_acid = SecondTable.acid--------------------------http://connectsql.blogspot.com/ |
 |
|
|
|
|