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-06-22 : 02:26:40
|
Dear All ,Please help me as its very urgent for me ..Iam getting duplicate data usig my qyeryplease suggest necessery changes in my querymy query is :-select gam.foracid as"GL Acct Number",gam.acct_name as"GL Acct Name",gam.foracid as"Second Leg Acct Number",htd.tran_date as"Tran Date",htd.value_date as" Value Date ",htd.part_tran_type as"Dr/Cr",HTD.RATE*HTD.TRAN_AMT as"Tran Amt in Local CCY",htd.tran_amt as"Tran amt in Acct CCY",htd.tran_particular as"Transaction Particular",htd.tran_id as" Tran id ",htd.rcre_user_id as"Maker id ",htd.lchg_user_id as"checker id",htd.dth_init_sol_id as"Initiating Sol id",gam.sol_id from GAM left outer join htd onGAM.acid = HTD.acid and GAM.SOL_ID = HTD.SOL_IDwhere GAM.del_flg ='N' andGAM.entity_cre_flg ='Y' and HTD.del_flg ='N'Table structure is table name GAM Common column-acid,bank_id,sol_idtable name 2-HTDCommon column-acid,bank_id,sol_idPLESAE advise me the proper relationship so that i can get a uniquw dataregards,Vipin jha |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2011-06-22 : 02:34:14
|
Your statement looks ok.Are there really duplicate rows or are they different in some columns?Maybe there are more than one matching row in HTD for each row in GAM, then it is normal to have "duplicates" in the result set. No, you're never too old to Yak'n'Roll if you're too young to die. |
 |
|
|
|
|
|
|